Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/imports/import_assets.rs')
| -rw-r--r-- | crates/ide-db/src/imports/import_assets.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/crates/ide-db/src/imports/import_assets.rs b/crates/ide-db/src/imports/import_assets.rs index 766bfcf4d0..5e33b08e4a 100644 --- a/crates/ide-db/src/imports/import_assets.rs +++ b/crates/ide-db/src/imports/import_assets.rs @@ -637,17 +637,13 @@ fn get_mod_path( prefer_no_std: bool, prefer_prelude: bool, ) -> Option<ModPath> { - if let Some(prefix_kind) = prefixed { - module_with_candidate.find_use_path_prefixed( - db, - item_to_search, - prefix_kind, - prefer_no_std, - prefer_prelude, - ) - } else { - module_with_candidate.find_use_path(db, item_to_search, prefer_no_std, prefer_prelude) - } + module_with_candidate.find_use_path( + db, + item_to_search, + prefixed.unwrap_or(PrefixKind::Plain), + prefer_no_std, + prefer_prelude, + ) } impl ImportCandidate { |