diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 80b4356..bffd35e 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -601,7 +601,9 @@ impl ArrayVec { pub fn remove(&mut self, index: usize) -> A::Item { let targets: &mut [A::Item] = &mut self.deref_mut()[index..]; let item = take(&mut targets[0]); - targets.rotate_left(1); + for i in 0..targets.len() - 1 { + targets.swap(i, i + 1); + } self.len -= 1; item }