about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-02 05:19:50 +0000
committerbors <bors@rust-lang.org>2015-10-02 05:19:50 +0000
commit7643c4ca75305d37121616ca89fd5d994eeddfbc (patch)
tree040ef5c15c39849c83b5e9b0f0275bb1d5ed50fc /src/libcore
parent0ffc6829751a551c7a34bad4c0be66055f552abb (diff)
parent8a959ad4472ad472668696dcaf9dbb7b41e93eec (diff)
downloadrust-7643c4ca75305d37121616ca89fd5d994eeddfbc.tar.gz
rust-7643c4ca75305d37121616ca89fd5d994eeddfbc.zip
Auto merge of #28792 - dotdash:cmp_indirection, r=alexcrichton
Using the comparison operators already refs the operands, so doing it
ourselves as well just adds an unnecessary level of indirection.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cmp_macros.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/cmp_macros.rs b/src/libcore/cmp_macros.rs
index 95dab3d165a..3863f63265b 100644
--- a/src/libcore/cmp_macros.rs
+++ b/src/libcore/cmp_macros.rs
@@ -21,9 +21,9 @@ macro_rules! __impl_slice_eq1 {
         #[stable(feature = "rust1", since = "1.0.0")]
         impl<'a, 'b, A: $Bound, B> PartialEq<$Rhs> for $Lhs where A: PartialEq<B> {
             #[inline]
-            fn eq(&self, other: &$Rhs) -> bool { &self[..] == &other[..] }
+            fn eq(&self, other: &$Rhs) -> bool { self[..] == other[..] }
             #[inline]
-            fn ne(&self, other: &$Rhs) -> bool { &self[..] != &other[..] }
+            fn ne(&self, other: &$Rhs) -> bool { self[..] != other[..] }
         }
     }
 }
@@ -39,9 +39,9 @@ macro_rules! __impl_slice_eq2 {
         #[stable(feature = "rust1", since = "1.0.0")]
         impl<'a, 'b, A: $Bound, B> PartialEq<$Lhs> for $Rhs where B: PartialEq<A> {
             #[inline]
-            fn eq(&self, other: &$Lhs) -> bool { &self[..] == &other[..] }
+            fn eq(&self, other: &$Lhs) -> bool { self[..] == other[..] }
             #[inline]
-            fn ne(&self, other: &$Lhs) -> bool { &self[..] != &other[..] }
+            fn ne(&self, other: &$Lhs) -> bool { self[..] != other[..] }
         }
     }
 }