From f80165dfa2253bb8da054296391c8bfe5012b69f Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 16 Jul 2016 22:09:55 -0400 Subject: [PATCH] Remove unnecessary indexing and deref in `Vec::as_mut_slice`. --- src/libcollections/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Vec { #[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.