Skip to content

Commit

Permalink
Fix unnecessary bound in Mass derive macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Canleskis committed Oct 13, 2024
1 parent ab3c64b commit 06a3872
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions particular_derive/src/gravity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ pub fn impl_position(input: syn::Result<syn::DeriveInput>) -> syn::Result<proc_m
.into())
}

pub fn impl_mass(
input: syn::Result<syn::DeriveInput>,
) -> syn::Result<proc_macro::TokenStream> {
pub fn impl_mass(input: syn::Result<syn::DeriveInput>) -> syn::Result<proc_macro::TokenStream> {
let mut input = input?;

let field = match &input.data {
Expand Down Expand Up @@ -90,14 +88,9 @@ pub fn impl_mass(
predicates: Default::default(),
})
.predicates
.extend::<[syn::WherePredicate; 2]>([
syn::parse_quote! {
Self: Position
},
syn::parse_quote! {
#field_type: ::core::clone::Clone
},
]);
.push(syn::parse_quote! {
#field_type: ::core::clone::Clone
});

let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl();
let name = &input.ident;
Expand Down

0 comments on commit 06a3872

Please sign in to comment.