fixed infinite loop in union_ordered_iter

This commit is contained in:
Evan Almloff committed 2022-04-20 12:17:16 -05:00
1 parent 7c30d93a3d
commit cebf17088b
2 files changed
+4 -2

No files matched your search

+4 -1
View File
@@ -26,7 +26,10 @@ pub(crate) fn union_ordered_iter<T: Ord + Debug>(
Ordering::Less => {
v.push(o_peekable.next().unwrap());
}
Ordering::Equal => (),
Ordering::Equal => {
o_peekable.next();
break;
}
}
}
v.push(s_peekable.next().unwrap());