Skip to content

Commit 1d647a0

Browse files
committed
Slice::swap should be inlineable
1 parent 8902936 commit 1d647a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/libcore/slice.rs

+1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ impl<T> SliceExt for [T] {
351351
ChunksMut { v: self, chunk_size: chunk_size }
352352
}
353353

354+
#[inline]
354355
fn swap(&mut self, a: usize, b: usize) {
355356
unsafe {
356357
// Can't take two mutable loans from one vector, so instead just cast

0 commit comments

Comments
 (0)