about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-07-17 12:04:51 -0700
committerGitHub <noreply@github.com>2016-07-17 12:04:51 -0700
commitf441bca4993450e4a2f63bac382f9ebc4be274d1 (patch)
tree1e5a800d7c0d55aec1fa0e6df762685cb1c0ca2c /src
parent34f35ed29c8acdbe1e3c172786fc41d6f4fb6090 (diff)
parentf80165dfa2253bb8da054296391c8bfe5012b69f (diff)
downloadrust-f441bca4993450e4a2f63bac382f9ebc4be274d1.tar.gz
rust-f441bca4993450e4a2f63bac382f9ebc4be274d1.zip
Auto merge of #34876 - frewsxcv:vec-as-mut-slice, r=alexcrichton
Remove unnecessary indexing and deref in `Vec::as_mut_slice`.

None
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/vec.rs2
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.