Skip to content

Commit

Permalink
fix up clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Jan 27, 2024
1 parent eabbb03 commit df51e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ fn gen_header(
fn gen_fn_type_for_trait(proxy_type: &ProxyType, trait_def: &ItemTrait) -> TokenStream2 {
// Only traits with exactly one method can be implemented for Fn-traits.
// Associated types and consts are also not allowed.
let method = trait_def.items.get(0).and_then(|item| {
let method = trait_def.items.first().and_then(|item| {
if let TraitItem::Fn(m) = item {
Some(m)
} else {
Expand Down

0 comments on commit df51e5a

Please sign in to comment.