1
Fork 0

Slice::swap should be inlineable

This commit is contained in:
David Creswick 2015-03-02 22:06:51 -06:00
parent 8902936552
commit 1d647a0eec

View file

@ -351,6 +351,7 @@ impl<T> SliceExt for [T] {
ChunksMut { v: self, chunk_size: chunk_size }
}
#[inline]
fn swap(&mut self, a: usize, b: usize) {
unsafe {
// Can't take two mutable loans from one vector, so instead just cast