perf: reserve in extend_sorted_vec (#21109)

This commit is contained in:
DaniPopes
2026-01-15 19:10:20 +00:00
committed by GitHub
parent e9b079ad62
commit 079f59c2be

View File

@@ -40,6 +40,7 @@ where
if other.is_empty() {
return;
}
target.reserve(other.len());
let mut other_iter = other.iter().peekable();
let initial_len = target.len();