Skip to content

Commit

Permalink
Do not create props struct if there are only generic arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Nov 5, 2023
1 parent 248b0c2 commit ff74446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autoprops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl Autoprops {

fn needs_a_properties_struct(&self) -> bool {
let syn::ItemFn { sig, .. } = &self.item_fn;
!sig.inputs.is_empty() || sig.generics.type_params().next().is_some()
!sig.inputs.is_empty()
}
}

Expand Down

0 comments on commit ff74446

Please sign in to comment.