diff options
| author | Corey Farwell <coreyf@rwell.org> | 2016-07-16 22:09:55 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2016-07-16 22:09:55 -0400 |
| commit | f80165dfa2253bb8da054296391c8bfe5012b69f (patch) | |
| tree | 4df8ad0b4e8933feb0c4a9557e5a221e8dbbd208 | |
| parent | b5ad2779ea155f6a1b2b61415bc804dcbb23400c (diff) | |
Remove unnecessary indexing and deref in `Vec::as_mut_slice`.
| -rw-r--r-- | src/libcollections/vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index da56b21cf0c..7a3c9bc3bb2 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -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. |
