Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6a06f6f

Browse files
committed
Deduplicate reference search results
1 parent 3a839ea commit 6a06f6f

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)