Tidy up the code (#12116)
Small follow-ups for https://github.com/zed-industries/zed/pull/12063 and https://github.com/zed-industries/zed/pull/12103 Release Notes: - N/A
This commit is contained in:
parent
c440f3a71b
commit
c4e87444e7
9 changed files with 130 additions and 104 deletions
|
@ -285,9 +285,9 @@ impl Matches {
|
|||
cmp::Ordering::Greater
|
||||
}
|
||||
|
||||
(Match::History(_, match_a), Match::History(_, match_b)) => match_b
|
||||
.cmp(match_a)
|
||||
.then(history_score_a.cmp(history_score_b)),
|
||||
(Match::History(_, match_a), Match::History(_, match_b)) => {
|
||||
match_b.cmp(match_a)
|
||||
}
|
||||
(Match::History(_, match_a), Match::Search(match_b)) => {
|
||||
Some(match_b).cmp(&match_a.as_ref())
|
||||
}
|
||||
|
@ -296,6 +296,7 @@ impl Matches {
|
|||
}
|
||||
(Match::Search(match_a), Match::Search(match_b)) => match_b.cmp(match_a),
|
||||
}
|
||||
.then(history_score_a.cmp(history_score_b))
|
||||
})
|
||||
.take(100)
|
||||
.map(|(_, m)| m)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue