aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-04-27 17:59:30 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-04-28 09:22:45 +0200
commitaf21229c0e9127cf2469280288b8484d2de82861 (patch)
tree3dec103b594dc24244d83d9276a339845bd18dd3 /components/script/dom/bindings/js.rs
parent7197052c0dd69eafb5331ba1c0d23f2afaa7f7eb (diff)
downloadservo-af21229c0e9127cf2469280288b8484d2de82861.tar.gz
servo-af21229c0e9127cf2469280288b8484d2de82861.zip
Remove the Comparable trait
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r--components/script/dom/bindings/js.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index e7f790fb1ab..b798d6c1e27 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -715,25 +715,3 @@ impl<'a, T: Reflectable> Reflectable for JSRef<'a, T> {
(**self).reflector()
}
}
-
-/// A trait for comparing smart pointers ignoring the lifetimes
-pub trait Comparable<T> {
- /// Returns whether the other value points to the same object.
- fn equals(&self, other: T) -> bool;
-}
-
-impl<'a, 'b, T> Comparable<JSRef<'a, T>> for JSRef<'b, T> {
- fn equals(&self, other: JSRef<'a, T>) -> bool {
- self.ptr == other.ptr
- }
-}
-
-impl<'a, 'b, T> Comparable<Option<JSRef<'a, T>>> for Option<JSRef<'b, T>> {
- fn equals(&self, other: Option<JSRef<'a, T>>) -> bool {
- match (*self, other) {
- (Some(x), Some(y)) => x.ptr == y.ptr,
- (None, None) => true,
- _ => false
- }
- }
-}