Skip to content

Commit a560dcf

Browse files
committed
Fix clippy lint issues
1 parent 82b8949 commit a560dcf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

bon-macros/src/builder/builder_gen/generic_setters.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ impl<'a> GenericSettersCtx<'a> {
2626
.collect();
2727

2828
// Check for interdependent type parameters in generic bounds
29-
for param in generics.iter() {
29+
for param in generics {
3030
if let syn::GenericParam::Type(type_param) = param {
3131
let params_in_bounds =
3232
find_type_params_in_bounds(&type_param.bounds, &type_param_idents);
3333
if params_in_bounds.len() > 1
34-
|| (params_in_bounds.len() == 1 && params_in_bounds[0] != &type_param.ident)
34+
|| (params_in_bounds.len() == 1
35+
&& params_in_bounds.get(0) != Some(&&type_param.ident))
3536
{
3637
let params_str = params_in_bounds
3738
.iter()
@@ -280,7 +281,7 @@ impl<'a> GenericSettersCtx<'a> {
280281
}
281282

282283
fn find_type_params_in_bounds<'b>(
283-
bounds: &syn::punctuated::Punctuated<syn::TypeParamBound, syn::token::Plus>,
284+
bounds: &Punctuated<syn::TypeParamBound, syn::token::Plus>,
284285
type_params: &'b [&'b syn::Ident],
285286
) -> Vec<&'b syn::Ident> {
286287
use syn::visit::Visit;

0 commit comments

Comments
 (0)