Slice::swap should be inlineable
This commit is contained in:
parent
8902936552
commit
1d647a0eec
1 changed files with 1 additions and 0 deletions
|
@ -351,6 +351,7 @@ impl<T> SliceExt for [T] {
|
||||||
ChunksMut { v: self, chunk_size: chunk_size }
|
ChunksMut { v: self, chunk_size: chunk_size }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn swap(&mut self, a: usize, b: usize) {
|
fn swap(&mut self, a: usize, b: usize) {
|
||||||
unsafe {
|
unsafe {
|
||||||
// Can't take two mutable loans from one vector, so instead just cast
|
// Can't take two mutable loans from one vector, so instead just cast
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue