From 4420fc3cc5e32358ce648df805a91e3b07e13d69 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 11 Apr 2020 09:11:35 +0200 Subject: [PATCH] note the leak in insert_many docs --- lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib.rs b/lib.rs index 27bfe13..ed83a75 100644 --- a/lib.rs +++ b/lib.rs @@ -865,6 +865,8 @@ impl SmallVec { /// 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>(&mut self, index: usize, iterable: I) { let iter = iterable.into_iter(); if index == self.len() {