mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 17:43:20 +03:00
Report all matching strings in fuzzy matcher even if they're duplicates
This commit is contained in:
parent
9c1f58ee89
commit
deb679b8f5
@ -117,7 +117,7 @@ pub struct StringMatch {
|
|||||||
|
|
||||||
impl PartialEq for StringMatch {
|
impl PartialEq for StringMatch {
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
self.score.eq(&other.score)
|
self.cmp(other).is_eq()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,13 +134,13 @@ impl Ord for StringMatch {
|
|||||||
self.score
|
self.score
|
||||||
.partial_cmp(&other.score)
|
.partial_cmp(&other.score)
|
||||||
.unwrap_or(Ordering::Equal)
|
.unwrap_or(Ordering::Equal)
|
||||||
.then_with(|| self.string.cmp(&other.string))
|
.then_with(|| self.candidate_index.cmp(&other.candidate_index))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialEq for PathMatch {
|
impl PartialEq for PathMatch {
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
self.score.eq(&other.score)
|
self.cmp(other).is_eq()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user