diff --git a/ecosystem/rust/parser/src/types/type_.rs b/ecosystem/rust/parser/src/types/type_.rs index 79a9fdcc..db34d075 100644 --- a/ecosystem/rust/parser/src/types/type_.rs +++ b/ecosystem/rust/parser/src/types/type_.rs @@ -182,7 +182,7 @@ mod test { type_: Type::i32().into() } ), - TypeParser.parse(quote! {&i32}, &&Default::default())? + TypeParser.parse(quote! {&i32}, &Default::default())? ); Ok(()) } diff --git a/ligen/ir/src/identifier/naming_convention.rs b/ligen/ir/src/identifier/naming_convention.rs index c88cfb6f..2ebe5e33 100644 --- a/ligen/ir/src/identifier/naming_convention.rs +++ b/ligen/ir/src/identifier/naming_convention.rs @@ -30,7 +30,7 @@ impl Identifier { NamingConvention::SnakeCase } else if self.name.chars().next().unwrap().is_uppercase() { NamingConvention::PascalCase - } else if self.name.chars().find(|c| c.is_uppercase()).is_some() { + } else if self.name.chars().any(|c| c.is_uppercase()) { NamingConvention::CamelCase } else { NamingConvention::Unknown @@ -110,7 +110,6 @@ impl Identifier { .chain(std::iter::once(self.name.len())) .collect::>(); (0 .. indices.len() - 1) - .into_iter() .map(|i| { &self.name[indices[i]..=(indices[i + 1] - 1)] }) @@ -128,7 +127,6 @@ impl Identifier { .chain(std::iter::once(self.name.len())) ).collect::>(); (0 .. indices.len() - 1) - .into_iter() .map(|i| { &self.name[indices[i]..=(indices[i + 1] - 1)] })