Skip to content

Commit

Permalink
Deduplicate reference search results
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Nov 7, 2022
1 parent 3a839ea commit 6a06f6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/ide/src/references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use ide_db::{
search::{ReferenceCategory, SearchScope, UsageSearchResult},
RootDatabase,
};
use itertools::Itertools;
use stdx::hash::NoHashHashMap;
use syntax::{
algo::find_node_at_offset,
Expand Down Expand Up @@ -86,6 +87,7 @@ pub(crate) fn find_all_refs(
file_id,
refs.into_iter()
.map(|file_ref| (file_ref.range, file_ref.category))
.unique()
.collect(),
)
})
Expand Down

0 comments on commit 6a06f6f

Please sign in to comment.