Fix clippy warnings
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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", "==", "&&");
|
||||
|
||||
Reference in New Issue
Block a user