Remove result from anchor cmp functions
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
ab631cf6c3
commit
92c7b5d6ef
11 changed files with 68 additions and 141 deletions
|
@ -1813,20 +1813,12 @@ impl BufferSnapshot {
|
|||
})
|
||||
.map(move |(replica_id, set)| {
|
||||
let start_ix = match set.selections.binary_search_by(|probe| {
|
||||
probe
|
||||
.end
|
||||
.cmp(&range.start, self)
|
||||
.unwrap()
|
||||
.then(Ordering::Greater)
|
||||
probe.end.cmp(&range.start, self).then(Ordering::Greater)
|
||||
}) {
|
||||
Ok(ix) | Err(ix) => ix,
|
||||
};
|
||||
let end_ix = match set.selections.binary_search_by(|probe| {
|
||||
probe
|
||||
.start
|
||||
.cmp(&range.end, self)
|
||||
.unwrap()
|
||||
.then(Ordering::Less)
|
||||
probe.start.cmp(&range.end, self).then(Ordering::Less)
|
||||
}) {
|
||||
Ok(ix) | Err(ix) => ix,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue