diff --git a/src/bindgen/bitflags.rs b/src/bindgen/bitflags.rs index 2ca0be6c..bc998e0a 100644 --- a/src/bindgen/bitflags.rs +++ b/src/bindgen/bitflags.rs @@ -137,13 +137,13 @@ struct FlagValueFold<'a> { out_of_line: bool, } -impl<'a> FlagValueFold<'a> { +impl FlagValueFold<'_> { fn is_self(&self, ident: &syn::Ident) -> bool { ident == self.struct_name || ident == "Self" } } -impl<'a> Fold for FlagValueFold<'a> { +impl Fold for FlagValueFold<'_> { fn fold_expr(&mut self, node: syn::Expr) -> syn::Expr { // bitflags 2 doesn't expose `bits` publically anymore, and the documented way to // combine flags is using the `bits` method, e.g. diff --git a/src/bindgen/ir/cfg.rs b/src/bindgen/ir/cfg.rs index 65de1a2f..e3d346c9 100644 --- a/src/bindgen/ir/cfg.rs +++ b/src/bindgen/ir/cfg.rs @@ -15,7 +15,7 @@ enum DefineKey<'a> { Named(&'a str, &'a str), } -impl<'a> DefineKey<'a> { +impl DefineKey<'_> { fn load(key: &str) -> DefineKey { // TODO: dirty parser if !key.contains('=') { diff --git a/src/bindgen/parser.rs b/src/bindgen/parser.rs index eb2ef2dc..13fa3f7e 100644 --- a/src/bindgen/parser.rs +++ b/src/bindgen/parser.rs @@ -106,7 +106,7 @@ struct Parser<'a> { out: Parse, } -impl<'a> Parser<'a> { +impl Parser<'_> { fn should_parse_dependency(&self, pkg_name: &str) -> bool { if self.parsed_crates.contains(pkg_name) { return false; diff --git a/src/bindgen/rename.rs b/src/bindgen/rename.rs index 6f4928ef..6ba5935a 100644 --- a/src/bindgen/rename.rs +++ b/src/bindgen/rename.rs @@ -15,7 +15,7 @@ pub enum IdentifierType<'a> { Enum, } -impl<'a> IdentifierType<'a> { +impl IdentifierType<'_> { fn to_str(self) -> &'static str { match self { IdentifierType::StructMember => "m", diff --git a/src/bindgen/writer.rs b/src/bindgen/writer.rs index f36757d2..1422726b 100644 --- a/src/bindgen/writer.rs +++ b/src/bindgen/writer.rs @@ -21,7 +21,7 @@ pub enum ListType<'a> { /// A utility wrapper to write unbuffered data and correctly adjust positions. struct InnerWriter<'a, 'b: 'a, F: 'a + Write>(&'a mut SourceWriter<'b, F>); -impl<'a, 'b, F: Write> Write for InnerWriter<'a, 'b, F> { +impl Write for InnerWriter<'_, '_, F> { fn write(&mut self, buf: &[u8]) -> io::Result { let writer = &mut self.0;