Skip to content

Commit 419a5a7

Browse files
committed
fix(generate): don't short-circuit within extend_sorted
1 parent c7b5f89 commit 419a5a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/generate/src/node_types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,12 +829,12 @@ fn extend_sorted<'a, T>(vec: &mut Vec<T>, values: impl IntoIterator<Item = &'a T
829829
where
830830
T: 'a + Clone + Eq + Ord,
831831
{
832-
values.into_iter().any(|value| {
832+
values.into_iter().fold(false, |acc, value| {
833833
if let Err(i) = vec.binary_search(value) {
834834
vec.insert(i, value.clone());
835835
true
836836
} else {
837-
false
837+
acc
838838
}
839839
})
840840
}

0 commit comments

Comments
 (0)