mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-16 09:15:02 +01:00
Clippy fixes
This commit is contained in:
parent
e1fd83b4d9
commit
92826697a3
6 changed files with 22 additions and 22 deletions
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue