Skip to content

Commit

Permalink
don't add From impl if there are generics
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj committed Oct 3, 2024
1 parent 6e1a59a commit e2f096d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server_fn_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ pub fn server_macro_impl(
let impl_from = impl_from.map(|v| v.value).unwrap_or(true);
let from_impl = (body.inputs.len() == 1
&& first_field.is_some()
&& body.generics.params.is_empty()
&& impl_from)
.then(|| {
let field = first_field.unwrap();
Expand Down

0 comments on commit e2f096d

Please sign in to comment.