note the leak in insert_many docs

This commit is contained in:
Ralf Jung
2020-04-11 09:11:35 +02:00
parent fdb73f8497
commit 4420fc3cc5
+2
View File
@@ -865,6 +865,8 @@ impl<A: Array> SmallVec<A> {
/// Insert multiple elements at position `index`, shifting all following elements toward the
/// back.
///
/// Note: when the iterator panics, this can leak memory.
pub fn insert_many<I: IntoIterator<Item = A::Item>>(&mut self, index: usize, iterable: I) {
let iter = iterable.into_iter();
if index == self.len() {