mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 06:03:16 +00:00
bigint: remove unnecessary method implements
This commit is contained in:
parent
36d698d544
commit
b247d17629
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user