diff --git a/Cargo.toml b/Cargo.toml index 6e92721..df218b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "auto_impl" -version = "1.1.0" +version = "1.1.1" authors = [ "Ashley Mannix ", "Lukas Kalbertodt ", diff --git a/src/gen.rs b/src/gen.rs index fef0721..300b8b5 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -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 {