Skip to content

Commit 03f6d92

Browse files
committed
minor: Remove unnecessary clones
1 parent 143a30a commit 03f6d92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/ide_db/src/helpers/import_assets.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl ImportAssets {
280280
.into_iter()
281281
.filter(|import| import.import_path.len() > 1)
282282
.filter(|import| !scope_definitions.contains(&ScopeDef::from(import.item_to_import)))
283-
.sorted_by_key(|import| import.import_path.clone())
283+
.sorted_by(|a, b| a.import_path.cmp(&b.import_path))
284284
.collect()
285285
}
286286

@@ -309,9 +309,9 @@ fn path_applicable_imports(
309309
current_crate,
310310
path_candidate.name.clone(),
311311
// FIXME: we could look up assoc items by the input and propose those in completion,
312-
// but that requries more preparation first:
312+
// but that requires more preparation first:
313313
// * store non-trait assoc items in import_map to fully enable this lookup
314-
// * ensure that does not degrade the performance (bencmark it)
314+
// * ensure that does not degrade the performance (benchmark it)
315315
// * write more logic to check for corresponding trait presence requirement (we're unable to flyimport multiple item right now)
316316
// * improve the associated completion item matching and/or scoring to ensure no noisy completions appear
317317
//

0 commit comments

Comments
 (0)