Skip to content

Commit

Permalink
bigint: remove unnecessary method implements
Browse files Browse the repository at this point in the history
  • Loading branch information
gifnksm committed Aug 25, 2013
1 parent 36d698d commit b247d17
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions src/libextra/num/bigint.rs
Expand Up @@ -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 }
}
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit b247d17

Please sign in to comment.