From 994000b5ddfd5bb3b7dc7d66aabe02a0f337770f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 4 Mar 2020 12:17:41 +0100 Subject: Use method instead of a free function --- crates/ra_ide/src/references.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index abecca2bb..6440707d7 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs @@ -28,9 +28,7 @@ use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeI pub(crate) use self::rename::rename; -pub use ra_ide_db::search::{ - find_refs_to_def, Reference, ReferenceAccess, ReferenceKind, SearchScope, -}; +pub use ra_ide_db::search::{Reference, ReferenceAccess, ReferenceKind, SearchScope}; #[derive(Debug, Clone)] pub struct ReferenceSearchResult { @@ -105,7 +103,8 @@ pub(crate) fn find_all_refs( let RangeInfo { range, info: def } = find_name(&sema, &syntax, position, opt_name)?; - let references = find_refs_to_def(db, &def, search_scope) + let references = def + .find_usages(db, search_scope) .into_iter() .filter(|r| search_kind == ReferenceKind::Other || search_kind == r.kind) .collect(); -- cgit v1.2.3