Improve .insert()'s removal of the last element

This commit is contained in:
root
2015-05-23 12:53:35 +02:00
parent 1eec0d4834
commit 3d579a626d
+1 -1
View File
@@ -244,7 +244,7 @@ impl<A: Array> ArrayVec<A> {
let mut ret = None;
let old_len = self.len();
if old_len == self.capacity() {
ret = self.remove(old_len - 1);
ret = self.pop();
}
let len = self.len();