diff options
author | Lukas Wirth <[email protected]> | 2021-01-12 14:56:24 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-01-12 14:56:24 +0000 |
commit | aff9102afb2b6756b3935dedb9be30401975b262 (patch) | |
tree | 34e38f7297ab93686f270bb03607e9e3590a6597 /crates/ide/src | |
parent | 2c1777a2e264e58fccd5ace94b238c8a497ddbda (diff) |
Rename FileReferences -> UsageSearchResult
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/references.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index c7943dc95..7d4757e02 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs | |||
@@ -15,7 +15,7 @@ use hir::Semantics; | |||
15 | use ide_db::{ | 15 | use ide_db::{ |
16 | base_db::FileId, | 16 | base_db::FileId, |
17 | defs::{Definition, NameClass, NameRefClass}, | 17 | defs::{Definition, NameClass, NameRefClass}, |
18 | search::{FileReference, FileReferences, ReferenceAccess, ReferenceKind, SearchScope}, | 18 | search::{FileReference, ReferenceAccess, ReferenceKind, SearchScope, UsageSearchResult}, |
19 | RootDatabase, | 19 | RootDatabase, |
20 | }; | 20 | }; |
21 | use syntax::{ | 21 | use syntax::{ |
@@ -29,7 +29,7 @@ use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeI | |||
29 | #[derive(Debug, Clone)] | 29 | #[derive(Debug, Clone)] |
30 | pub struct ReferenceSearchResult { | 30 | pub struct ReferenceSearchResult { |
31 | declaration: Declaration, | 31 | declaration: Declaration, |
32 | references: FileReferences, | 32 | references: UsageSearchResult, |
33 | } | 33 | } |
34 | 34 | ||
35 | #[derive(Debug, Clone)] | 35 | #[derive(Debug, Clone)] |
@@ -48,11 +48,11 @@ impl ReferenceSearchResult { | |||
48 | &self.declaration.nav | 48 | &self.declaration.nav |
49 | } | 49 | } |
50 | 50 | ||
51 | pub fn references(&self) -> &FileReferences { | 51 | pub fn references(&self) -> &UsageSearchResult { |
52 | &self.references | 52 | &self.references |
53 | } | 53 | } |
54 | 54 | ||
55 | pub fn references_with_declaration(mut self) -> FileReferences { | 55 | pub fn references_with_declaration(mut self) -> UsageSearchResult { |
56 | let decl_ref = FileReference { | 56 | let decl_ref = FileReference { |
57 | range: self.declaration.nav.focus_or_full_range(), | 57 | range: self.declaration.nav.focus_or_full_range(), |
58 | kind: self.declaration.kind, | 58 | kind: self.declaration.kind, |
@@ -315,7 +315,7 @@ fn try_find_self_references( | |||
315 | .collect() | 315 | .collect() |
316 | }) | 316 | }) |
317 | .unwrap_or_default(); | 317 | .unwrap_or_default(); |
318 | let mut references = FileReferences::default(); | 318 | let mut references = UsageSearchResult::default(); |
319 | references.references.insert(file_id, refs); | 319 | references.references.insert(file_id, refs); |
320 | 320 | ||
321 | Some(RangeInfo::new( | 321 | Some(RangeInfo::new( |