Skip to content

Commit f80165d

Browse files
committed
Remove unnecessary indexing and deref in Vec::as_mut_slice.
1 parent b5ad277 commit f80165d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcollections/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ impl<T> Vec<T> {
520520
#[inline]
521521
#[stable(feature = "vec_as_slice", since = "1.7.0")]
522522
pub fn as_mut_slice(&mut self) -> &mut [T] {
523-
&mut self[..]
523+
self
524524
}
525525

526526
/// Sets the length of a vector.

0 commit comments

Comments
 (0)