From 56e67e3a392d7c7c7f30ca39d8e83446ea8bbec3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 15 Oct 2020 17:27:50 +0200 Subject: More idiomatic classification API --- crates/ide/src/references/rename.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide/src/references') diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index f9a11e43d..35aafc49d 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs @@ -3,7 +3,7 @@ use base_db::SourceDatabaseExt; use hir::{Module, ModuleDef, ModuleSource, Semantics}; use ide_db::{ - defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, + defs::{Definition, NameClass, NameRefClass}, RootDatabase, }; @@ -88,13 +88,13 @@ fn find_module_at_offset( let module = match_ast! { match (ident.parent()) { ast::NameRef(name_ref) => { - match classify_name_ref(sema, &name_ref)? { + match NameRefClass::classify(sema, &name_ref)? { NameRefClass::Definition(Definition::ModuleDef(ModuleDef::Module(module))) => module, _ => return None, } }, ast::Name(name) => { - match classify_name(&sema, &name)? { + match NameClass::classify(&sema, &name)? { NameClass::Definition(Definition::ModuleDef(ModuleDef::Module(module))) => module, _ => return None, } -- cgit v1.2.3