std: remove the equals method from TotalEq.
`TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
This commit is contained in:
@@ -339,12 +339,7 @@ impl<T: Ord> Ord for Vec<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: TotalEq> TotalEq for Vec<T> {
|
||||
#[inline]
|
||||
fn equals(&self, other: &Vec<T>) -> bool {
|
||||
self.as_slice().equals(&other.as_slice())
|
||||
}
|
||||
}
|
||||
impl<T: TotalEq> TotalEq for Vec<T> {}
|
||||
|
||||
impl<T: TotalOrd> TotalOrd for Vec<T> {
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user