Skip to content

Commit f441bca

Browse files
authored
Auto merge of #34876 - frewsxcv:vec-as-mut-slice, r=alexcrichton
Remove unnecessary indexing and deref in `Vec::as_mut_slice`. None
2 parents 34f35ed + f80165d commit f441bca

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)