From b247d176297f85c01e89c64d6058dbdd539cb95a Mon Sep 17 00:00:00 2001 From: gifnksm Date: Sun, 25 Aug 2013 22:36:55 +0900 Subject: [PATCH] bigint: remove unnecessary method implements --- src/libextra/num/bigint.rs | 42 -------------------------------------- 1 file changed, 42 deletions(-) diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index e2fc3e6bd8ab..f15f4db2ebdb 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -88,14 +88,10 @@ pub struct BigUint { } impl Eq for BigUint { - fn eq(&self, other: &BigUint) -> bool { self.equals(other) } - - fn ne(&self, other: &BigUint) -> bool { !self.equals(other) } } impl TotalEq for BigUint { - fn equals(&self, other: &BigUint) -> bool { match self.cmp(other) { Equal => true, _ => false } } @@ -106,18 +102,6 @@ impl Ord for BigUint { fn lt(&self, other: &BigUint) -> bool { match self.cmp(other) { Less => true, _ => false} } - - fn le(&self, other: &BigUint) -> bool { - match self.cmp(other) { Less | Equal => true, _ => false } - } - - fn ge(&self, other: &BigUint) -> bool { - match self.cmp(other) { Greater | Equal => true, _ => false } - } - - fn gt(&self, other: &BigUint) -> bool { - match self.cmp(other) { Greater => true, _ => false } - } } impl TotalOrd for BigUint { @@ -710,18 +694,6 @@ impl Ord for Sign { fn lt(&self, other: &Sign) -> bool { match self.cmp(other) { Less => true, _ => false} } - - fn le(&self, other: &Sign) -> bool { - match self.cmp(other) { Less | Equal => true, _ => false } - } - - fn ge(&self, other: &Sign) -> bool { - match self.cmp(other) { Greater | Equal => true, _ => false } - } - - fn gt(&self, other: &Sign) -> bool { - match self.cmp(other) { Greater => true, _ => false } - } } impl TotalEq for Sign { @@ -762,8 +734,6 @@ pub struct BigInt { impl Eq for BigInt { fn eq(&self, other: &BigInt) -> bool { self.equals(other) } - - fn ne(&self, other: &BigInt) -> bool { !self.equals(other) } } impl TotalEq for BigInt { @@ -778,18 +748,6 @@ impl Ord for BigInt { fn lt(&self, other: &BigInt) -> bool { match self.cmp(other) { Less => true, _ => false} } - - fn le(&self, other: &BigInt) -> bool { - match self.cmp(other) { Less | Equal => true, _ => false } - } - - fn ge(&self, other: &BigInt) -> bool { - match self.cmp(other) { Greater | Equal => true, _ => false } - } - - fn gt(&self, other: &BigInt) -> bool { - match self.cmp(other) { Greater => true, _ => false } - } } impl TotalOrd for BigInt {