From c9b4ac5be4daaabc062ab1ee663eba8594750003 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:24:16 +0530 Subject: clippy::redudant_borrow --- crates/ide_db/src/helpers/import_assets.rs | 4 ++-- crates/ide_db/src/helpers/merge_imports.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide_db/src/helpers') diff --git a/crates/ide_db/src/helpers/import_assets.rs b/crates/ide_db/src/helpers/import_assets.rs index ae52dd8bb..9634d872e 100644 --- a/crates/ide_db/src/helpers/import_assets.rs +++ b/crates/ide_db/src/helpers/import_assets.rs @@ -323,7 +323,7 @@ fn import_for_item( } let segment_import = - find_import_for_segment(db, original_item_candidate, &unresolved_first_segment)?; + find_import_for_segment(db, original_item_candidate, unresolved_first_segment)?; let trait_item_to_import = item_as_assoc(db, original_item) .and_then(|assoc| assoc.containing_trait(db)) .map(|trait_| ItemInNs::from(ModuleDef::from(trait_))); @@ -383,7 +383,7 @@ fn find_import_for_segment( original_item } else { let matching_module = - module_with_segment_name(db, &unresolved_first_segment, original_item)?; + module_with_segment_name(db, unresolved_first_segment, original_item)?; ItemInNs::from(ModuleDef::from(matching_module)) }) } diff --git a/crates/ide_db/src/helpers/merge_imports.rs b/crates/ide_db/src/helpers/merge_imports.rs index 0dbabb44f..ec29476a4 100644 --- a/crates/ide_db/src/helpers/merge_imports.rs +++ b/crates/ide_db/src/helpers/merge_imports.rs @@ -124,7 +124,7 @@ fn recursive_merge( .map(|tree_list| tree_list.use_trees().any(tree_is_self)) .unwrap_or(false) }; - match (tree_contains_self(&lhs_t), tree_contains_self(&rhs_t)) { + match (tree_contains_self(lhs_t), tree_contains_self(&rhs_t)) { (true, false) => continue, (false, true) => { *lhs_t = rhs_t; -- cgit v1.2.3