Skip to content

Commit

Permalink
Slice::swap should be inlineable
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrewi committed Mar 3, 2015
1 parent 8902936 commit 1d647a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d647a0

Please sign in to comment.