about summary refs log tree commit diff
path: root/src/libuuid/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-03-23 08:36:51 -0700
committerbors <bors@rust-lang.org>2014-03-23 08:36:51 -0700
commit903e83889ade166bf62f1ee74df8bf8331ea17d1 (patch)
tree2d2c838f7adc52628632948a8b37820c4f03ed75 /src/libuuid/lib.rs
parentcafb7ed6f671a0102c4df9abad43b747c00f5cdf (diff)
parentf6db0ef9464a17fa6e547e755b1b5dfa09af9499 (diff)
auto merge of #13102 : huonw/rust/totaleq-deriving, r=thestinger
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
:(.)
Diffstat (limited to 'src/libuuid/lib.rs')
-rw-r--r--src/libuuid/lib.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libuuid/lib.rs b/src/libuuid/lib.rs
index 3338c3a3009..d31b0f43a09 100644
--- a/src/libuuid/lib.rs
+++ b/src/libuuid/lib.rs
@@ -487,14 +487,7 @@ impl Eq for Uuid {
     }
 }
 
-/// Test two UUIDs for equality
-///
-/// UUIDs are equal only when they are byte-for-byte identical
-impl TotalEq for Uuid {
-    fn equals(&self, other: &Uuid) -> bool {
-        self.bytes == other.bytes
-    }
-}
+impl TotalEq for Uuid {}
 
 // FIXME #9845: Test these more thoroughly
 impl<T: Encoder> Encodable<T> for Uuid {