Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/query-group-macro/src/queries.rs')
| -rw-r--r-- | crates/query-group-macro/src/queries.rs | 47 |
1 files changed, 10 insertions, 37 deletions
diff --git a/crates/query-group-macro/src/queries.rs b/crates/query-group-macro/src/queries.rs index b7de7f6b2a..62dced54d0 100644 --- a/crates/query-group-macro/src/queries.rs +++ b/crates/query-group-macro/src/queries.rs @@ -12,12 +12,6 @@ pub(crate) struct TrackedQuery { pub(crate) invoke: Option<Path>, pub(crate) default: Option<syn::Block>, pub(crate) cycle: Option<Cycle>, - pub(crate) generated_struct: Option<GeneratedInputStruct>, -} - -pub(crate) struct GeneratedInputStruct { - pub(crate) input_struct_name: Ident, - pub(crate) create_data_ident: Ident, } impl ToTokens for TrackedQuery { @@ -64,37 +58,16 @@ impl ToTokens for TrackedQuery { } }; - let method = match &self.generated_struct { - Some(generated_struct) => { - let input_struct_name = &generated_struct.input_struct_name; - let create_data_ident = &generated_struct.create_data_ident; - - quote! { - #sig { - #annotation - fn #shim<'db>( - db: &'db dyn #trait_name, - _input: #input_struct_name, - #(#pat_and_tys),* - ) #ret - #invoke_block - #shim(self, #create_data_ident(self), #(#params),*) - } - } - } - None => { - quote! { - #sig { - #annotation - fn #shim<'db>( - db: &'db dyn #trait_name, - #(#pat_and_tys),* - ) #ret - #invoke_block - - #shim(self, #(#params),*) - } - } + let method = quote! { + #sig { + #annotation + fn #shim<'db>( + db: &'db dyn #trait_name, + #(#pat_and_tys),* + ) #ret + #invoke_block + + #shim(self, #(#params),*) } }; |