mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
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:
@@ -520,7 +520,7 @@ pub fn as_slice(&self) -> &[T] {
|
||||
#[inline]
|
||||
#[stable(feature = "vec_as_slice", since = "1.7.0")]
|
||||
pub fn as_mut_slice(&mut self) -> &mut [T] {
|
||||
&mut self[..]
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the length of a vector.
|
||||
|
||||
Reference in New Issue
Block a user