diff --git a/src/bindgen/cargo/cargo_expand.rs b/src/bindgen/cargo/cargo_expand.rs index 01e4183..1548fa4 100644 --- a/src/bindgen/cargo/cargo_expand.rs +++ b/src/bindgen/cargo/cargo_expand.rs @@ -58,6 +58,7 @@ impl error::Error for Error { /// Use rustc to expand and pretty print the crate into a single file, /// removing any macros in the process. +#[allow(clippy::too_many_arguments)] pub fn expand( manifest_path: &Path, crate_name: &str, diff --git a/src/bindgen/ir/enumeration.rs b/src/bindgen/ir/enumeration.rs index 03ef8fe..7359e19 100644 --- a/src/bindgen/ir/enumeration.rs +++ b/src/bindgen/ir/enumeration.rs @@ -1141,7 +1141,7 @@ impl Enum { write!(out, "{} ", attrs); } }}; - }; + } write_attrs!("constructor"); write!(out, "static {} {}(", self.export_name, variant.export_name); @@ -1297,7 +1297,7 @@ impl Enum { write!(out, "{} ", attrs); } }}; - }; + } if self.can_derive_eq() && config.structure.derive_eq(&self.annotations) { out.new_line(); diff --git a/src/bindgen/ir/function.rs b/src/bindgen/ir/function.rs index 56e8e79..6d310aa 100644 --- a/src/bindgen/ir/function.rs +++ b/src/bindgen/ir/function.rs @@ -61,7 +61,7 @@ impl Function { never_return = true; Type::Primitive(PrimitiveType::Void) } else { - Type::load(ty)?.unwrap_or_else(|| Type::Primitive(PrimitiveType::Void)) + Type::load(ty)?.unwrap_or(Type::Primitive(PrimitiveType::Void)) } } }; @@ -328,7 +328,7 @@ impl Source for Function { out.write(";"); condition.write_after(config, out); - }; + } let option_1 = out.measure(|out| write_1(self, config, out)); diff --git a/src/bindgen/ir/structure.rs b/src/bindgen/ir/structure.rs index a5a8740..8686758 100644 --- a/src/bindgen/ir/structure.rs +++ b/src/bindgen/ir/structure.rs @@ -645,7 +645,7 @@ impl Source for Struct { out.write(";"); out.close_brace(false); }}; - }; + } if config.structure.derive_eq(&self.annotations) && self.can_derive_eq() { emit_op!("eq", "==", "&&");