Rollup merge of #22988 - dcrewi:slice-swap-inline, r=alexcrichton

This commit is contained in:
Manish Goregaokar 2015-03-03 14:19:09 +05:30
commit 4f1f5eb1ab

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