changed to Q
This commit is contained in:
@ -9,11 +9,11 @@ pub fn derive_http_get_request(input: TokenStream) -> TokenStream {
|
||||
let query_name = &input.ident;
|
||||
let query_name_str = query_name.to_string();
|
||||
|
||||
// Derive response enum name by replacing "Query" suffix with "Response"
|
||||
let response_name_str = if query_name_str.ends_with("Query") {
|
||||
query_name_str.trim_end_matches("Query").to_string() + "Response"
|
||||
// Derive response enum name by replacing "Q" suffix with "Response"
|
||||
let response_name_str = if query_name_str.ends_with("Q") {
|
||||
query_name_str.trim_end_matches("Q").to_string() + "Response"
|
||||
} else {
|
||||
panic!("HttpRequest derive macro expects the struct name to end with 'Query'");
|
||||
panic!("HttpRequest derive macro expects the struct name to end with 'Q'");
|
||||
};
|
||||
let response_name = format_ident!("{}", response_name_str);
|
||||
|
||||
|
Reference in New Issue
Block a user