mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-05 20:55:05 +00:00
index: use "while let" in common_ancestors_pos()
This commit is contained in:
parent
02c84a8596
commit
ea4bdd718d
1 changed files with 1 additions and 3 deletions
|
@ -911,9 +911,7 @@ impl<'a> CompositeIndex<'a> {
|
|||
.collect();
|
||||
|
||||
let mut result = BTreeSet::new();
|
||||
while !(items1.is_empty() || items2.is_empty()) {
|
||||
let entry1 = items1.last().unwrap();
|
||||
let entry2 = items2.last().unwrap();
|
||||
while let (Some(entry1), Some(entry2)) = (items1.last(), items2.last()) {
|
||||
match entry1.cmp(entry2) {
|
||||
Ordering::Greater => {
|
||||
let entry1 = items1.pop_last().unwrap();
|
||||
|
|
Loading…
Reference in a new issue