Clippy fixes

This commit is contained in:
nora 2022-12-19 14:00:32 +01:00
parent e1fd83b4d9
commit 92826697a3
No known key found for this signature in database
6 changed files with 22 additions and 22 deletions

View file

@ -117,7 +117,7 @@ impl<'ws, 'cfg> DepExpander<'ws, 'cfg> {
let name = unit.target.crate_name();
let ast =
cargo_expand(unit.target.src_path()).context(format!("expanding crate `{}`", name))?;
cargo_expand(unit.target.src_path()).context(format!("expanding crate `{name}`"))?;
let deps = self
.bcx
@ -230,10 +230,10 @@ impl VisitMut for MakePubCrateVisitor {
fn clean_items_general(items: &mut Vec<Item>) {
items.retain(|item| match item {
Item::ExternCrate(ItemExternCrate { ident, .. }) if ident.to_string() == "std" => false,
Item::ExternCrate(ItemExternCrate { ident, .. }) if *ident == "std" => false,
Item::Use(ItemUse { attrs, .. }) => attrs
.get(0)
.map(|attr| attr.path.segments[0].ident.to_string() != "prelude_import")
.map(|attr| attr.path.segments[0].ident != "prelude_import")
.unwrap_or(true),
_ => true,
})