From 9faf8dd69a819e50b9c973857fe324d7605e2d24 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 8 Mar 2021 22:14:52 +0300 Subject: Hygiene is an internal implementation detail of the compiler --- crates/ide_assists/src/handlers/qualify_path.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ide_assists/src/handlers/qualify_path.rs') 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 @@ use std::iter; -use hir::{AsAssocItem, AsName}; +use hir::AsAssocItem; use ide_db::helpers::{import_assets::ImportCandidate, mod_path_to_ast}; use ide_db::RootDatabase; use syntax::{ @@ -160,7 +160,9 @@ fn find_trait_method( ) -> Option { if let Some(hir::AssocItem::Function(method)) = trait_.items(db).into_iter().find(|item: &hir::AssocItem| { - item.name(db).map(|name| name == trait_method_name.as_name()).unwrap_or(false) + item.name(db) + .map(|name| name.to_string() == trait_method_name.to_string()) + .unwrap_or(false) }) { Some(method) -- cgit v1.2.3