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.
This commit is contained in:
parent
06783ce831
commit
854e219d0a
|
@ -184,7 +184,7 @@ macro_rules! tuple_impls {
|
|||
}
|
||||
#[inline]
|
||||
fn ne(&self, other: &($($T,)+)) -> bool {
|
||||
!(*self == *other)
|
||||
$(*self.$get_ref_fn() != *other.$get_ref_fn())||+
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue