Skip to content

Commit 31fa865

Browse files
committed
drop some redundant Ord method implementations
1 parent 2b035d9 commit 31fa865

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

src/libextra/json.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -1164,9 +1164,6 @@ impl Ord for Json {
11641164
}
11651165
}
11661166
}
1167-
fn le(&self, other: &Json) -> bool { !(*other).lt(&(*self)) }
1168-
fn ge(&self, other: &Json) -> bool { !(*self).lt(other) }
1169-
fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self)) }
11701167
}
11711168

11721169
/// A trait for converting values to JSON

src/libextra/num/rational.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ macro_rules! cmp_impl {
107107
}
108108
cmp_impl!(impl Eq, eq, ne)
109109
cmp_impl!(impl TotalEq, equals)
110-
cmp_impl!(impl Ord, lt, gt, le, ge)
110+
cmp_impl!(impl Ord, lt)
111111
cmp_impl!(impl TotalOrd, cmp -> cmp::Ordering)
112112

113113
impl<T: Clone + Integer + Ord> Orderable for Ratio<T> {

src/libextra/semver.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -37,18 +37,6 @@ impl cmp::Ord for Identifier {
3737
(&AlphaNumeric(_), _) => false
3838
}
3939
}
40-
#[inline]
41-
fn le(&self, other: &Identifier) -> bool {
42-
! (other < self)
43-
}
44-
#[inline]
45-
fn gt(&self, other: &Identifier) -> bool {
46-
other < self
47-
}
48-
#[inline]
49-
fn ge(&self, other: &Identifier) -> bool {
50-
! (self < other)
51-
}
5240
}
5341

5442
impl ToStr for Identifier {

0 commit comments

Comments
 (0)