Skip to content

Commit 854e219

Browse files
author
blake2-ppc
committed
std::tuple: Use != properly in Eq::ne for tuples
Just like the Ord methods, Eq::ne needs to be implemented in terms of the same operation on the elements.
1 parent 06783ce commit 854e219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/tuple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ macro_rules! tuple_impls {
184184
}
185185
#[inline]
186186
fn ne(&self, other: &($($T,)+)) -> bool {
187-
!(*self == *other)
187+
$(*self.$get_ref_fn() != *other.$get_ref_fn())||+
188188
}
189189
}
190190

0 commit comments

Comments
 (0)