Auto merge of #34876 - frewsxcv:vec-as-mut-slice, r=alexcrichton
Remove unnecessary indexing and deref in `Vec::as_mut_slice`. None
This commit is contained in:
commit
f441bca499
1 changed files with 1 additions and 1 deletions
|
@ -520,7 +520,7 @@ impl<T> Vec<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "vec_as_slice", since = "1.7.0")]
|
#[stable(feature = "vec_as_slice", since = "1.7.0")]
|
||||||
pub fn as_mut_slice(&mut self) -> &mut [T] {
|
pub fn as_mut_slice(&mut self) -> &mut [T] {
|
||||||
&mut self[..]
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the length of a vector.
|
/// Sets the length of a vector.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue