about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2021-12-11 15:27:36 +0100
committerLukas Wirth <lukastw97@gmail.com>2021-12-11 15:27:36 +0100
commit03f6d92ae4796ca0f18aab689f0c0bf311e2072c (patch)
tree61915c5643e4f662074b03f3ca66439b70bb0f24
parent143a30aa519ecdb8b98bf6bf2c625f77920e7921 (diff)
downloadrust-03f6d92ae4796ca0f18aab689f0c0bf311e2072c.tar.gz
rust-03f6d92ae4796ca0f18aab689f0c0bf311e2072c.zip
minor: Remove unnecessary clones
-rw-r--r--crates/ide_db/src/helpers/import_assets.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_db/src/helpers/import_assets.rs b/crates/ide_db/src/helpers/import_assets.rs
index 024e0c9f81f..291675c4cc0 100644
--- a/crates/ide_db/src/helpers/import_assets.rs
+++ b/crates/ide_db/src/helpers/import_assets.rs
@@ -280,7 +280,7 @@ impl ImportAssets {
         .into_iter()
         .filter(|import| import.import_path.len() > 1)
         .filter(|import| !scope_definitions.contains(&ScopeDef::from(import.item_to_import)))
-        .sorted_by_key(|import| import.import_path.clone())
+        .sorted_by(|a, b| a.import_path.cmp(&b.import_path))
         .collect()
     }
 
@@ -309,9 +309,9 @@ fn path_applicable_imports(
                 current_crate,
                 path_candidate.name.clone(),
                 // FIXME: we could look up assoc items by the input and propose those in completion,
-                // but that requries more preparation first:
+                // but that requires more preparation first:
                 // * store non-trait assoc items in import_map to fully enable this lookup
-                // * ensure that does not degrade the performance (bencmark it)
+                // * ensure that does not degrade the performance (benchmark it)
                 // * write more logic to check for corresponding trait presence requirement (we're unable to flyimport multiple item right now)
                 // * improve the associated completion item matching and/or scoring to ensure no noisy completions appear
                 //