diff options
author | Aleksey Kladov <[email protected]> | 2021-03-08 19:14:52 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-03-08 19:14:52 +0000 |
commit | 9faf8dd69a819e50b9c973857fe324d7605e2d24 (patch) | |
tree | a9eccedac7905ac3b6d6608b4607241ddefe6a63 /crates/ide_assists/src/handlers/qualify_path.rs | |
parent | e346a9c5e1f5fb536df19086a52411cf05255ac9 (diff) |
Hygiene is an internal implementation detail of the compiler
Diffstat (limited to 'crates/ide_assists/src/handlers/qualify_path.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/qualify_path.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ide_assists/src/handlers/qualify_path.rs b/crates/ide_assists/src/handlers/qualify_path.rs index b0b0d31b4..d84ca0e55 100644 --- a/crates/ide_assists/src/handlers/qualify_path.rs +++ b/crates/ide_assists/src/handlers/qualify_path.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::iter; | 1 | use std::iter; |
2 | 2 | ||
3 | use hir::{AsAssocItem, AsName}; | 3 | use hir::AsAssocItem; |
4 | use ide_db::helpers::{import_assets::ImportCandidate, mod_path_to_ast}; | 4 | use ide_db::helpers::{import_assets::ImportCandidate, mod_path_to_ast}; |
5 | use ide_db::RootDatabase; | 5 | use ide_db::RootDatabase; |
6 | use syntax::{ | 6 | use syntax::{ |
@@ -160,7 +160,9 @@ fn find_trait_method( | |||
160 | ) -> Option<hir::Function> { | 160 | ) -> Option<hir::Function> { |
161 | if let Some(hir::AssocItem::Function(method)) = | 161 | if let Some(hir::AssocItem::Function(method)) = |
162 | trait_.items(db).into_iter().find(|item: &hir::AssocItem| { | 162 | trait_.items(db).into_iter().find(|item: &hir::AssocItem| { |
163 | item.name(db).map(|name| name == trait_method_name.as_name()).unwrap_or(false) | 163 | item.name(db) |
164 | .map(|name| name.to_string() == trait_method_name.to_string()) | ||
165 | .unwrap_or(false) | ||
164 | }) | 166 | }) |
165 | { | 167 | { |
166 | Some(method) | 168 | Some(method) |