Remove unnecessary indexing and deref in Vec::as_mut_slice.

This commit is contained in:
Corey Farwell 2016-07-16 22:09:55 -04:00
parent b5ad2779ea
commit f80165dfa2

View File

@ -520,7 +520,7 @@ impl<T> Vec<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.