Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/auto_import.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/auto_import.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/auto_import.rs b/crates/ide-assists/src/handlers/auto_import.rs index 698ad78cce..17ffb861fd 100644 --- a/crates/ide-assists/src/handlers/auto_import.rs +++ b/crates/ide-assists/src/handlers/auto_import.rs @@ -203,7 +203,7 @@ fn relevance_score( // get the distance between the imported path and the current module // (prefer items that are more local) Some((item_module, current_module)) => { - score -= module_distance_hueristic(db, current_module, &item_module) as i32; + score -= module_distance_heuristic(db, current_module, &item_module) as i32; } // could not find relevant modules, so just use the length of the path as an estimate @@ -214,7 +214,7 @@ fn relevance_score( } /// A heuristic that gives a higher score to modules that are more separated. -fn module_distance_hueristic(db: &dyn HirDatabase, current: &Module, item: &Module) -> usize { +fn module_distance_heuristic(db: &dyn HirDatabase, current: &Module, item: &Module) -> usize { // get the path starting from the item to the respective crate roots let mut current_path = current.path_to_root(db); let mut item_path = item.path_to_root(db); |