Skip to content

Commit

Permalink
clippy: remove unneeded let_and_return
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed May 29, 2024
1 parent 5eb4a61 commit 2c7758e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions borsh-derive/src/internals/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ fn declaration(ident_str: &str, cratename: Path, params_for_bounds: Vec<Type>) -
}
}

#[allow(clippy::let_and_return)]
fn filter_used_params(generics: &Generics, not_skipped_type_params: HashSet<Ident>) -> Generics {
let new_params = generics
.params
Expand All @@ -81,16 +80,15 @@ fn filter_used_params(generics: &Generics, not_skipped_type_params: HashSet<Iden
feature = "force_exhaustive_checks",
deny(non_exhaustive_omitted_patterns)
)]
let result = match predicate {
match predicate {
WherePredicate::Lifetime(..) => true,
WherePredicate::Type(predicate_type) => generics::type_contains_some_param(
&predicate_type.bounded_ty,
&not_skipped_type_params,
),

_ => true,
};
result
}
})
.cloned()
.collect();
Expand Down

0 comments on commit 2c7758e

Please sign in to comment.