Skip to content

Commit a27e4da

Browse files
committed
Auto merge of #13571 - Veykril:unique-references, r=Veykril
minor: Deduplicate reference search results Fixes #13407
2 parents d1c9775 + 6a06f6f commit a27e4da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/ide/src/references.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use ide_db::{
1616
search::{ReferenceCategory, SearchScope, UsageSearchResult},
1717
RootDatabase,
1818
};
19+
use itertools::Itertools;
1920
use stdx::hash::NoHashHashMap;
2021
use syntax::{
2122
algo::find_node_at_offset,
@@ -86,6 +87,7 @@ pub(crate) fn find_all_refs(
8687
file_id,
8788
refs.into_iter()
8889
.map(|file_ref| (file_ref.range, file_ref.category))
90+
.unique()
8991
.collect(),
9092
)
9193
})

0 commit comments

Comments
 (0)