diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-03-15 21:04:56 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2014-03-15 21:04:56 -0700 |
| commit | 2c372201d447cbf4d3e1e2d675d1776e765f3b65 (patch) | |
| tree | fb014ecb18c6bb47eb877b1c1d8e5426ed809069 /src/libstd | |
| parent | 352c5e7eb767401e426e526acf5c8fe0311d8c30 (diff) | |
| download | rust-2c372201d447cbf4d3e1e2d675d1776e765f3b65.tar.gz rust-2c372201d447cbf4d3e1e2d675d1776e765f3b65.zip | |
Remove std::cmp::cmp2.
It isn't used anywhere and `cmp2(a, b, c, d)` is identical to `(a, b).cmp(&(c, d))`.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/cmp.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs index 023b2028703..5130da44ed5 100644 --- a/src/libstd/cmp.rs +++ b/src/libstd/cmp.rs @@ -130,18 +130,6 @@ totalord_impl!(uint) totalord_impl!(char) -/// Compares (a1, b1) against (a2, b2), where the a values are more significant. -pub fn cmp2<A:TotalOrd,B:TotalOrd>( - a1: &A, b1: &B, - a2: &A, b2: &B) -> Ordering -{ - match a1.cmp(a2) { - Less => Less, - Greater => Greater, - Equal => b1.cmp(b2) - } -} - /** Return `o1` if it is not `Equal`, otherwise `o2`. Simulates the lexical ordering on a type `(int, int)`. @@ -207,14 +195,6 @@ mod test { } #[test] - fn test_cmp2() { - assert_eq!(cmp2(1, 2, 3, 4), Less); - assert_eq!(cmp2(3, 2, 3, 4), Less); - assert_eq!(cmp2(5, 2, 3, 4), Greater); - assert_eq!(cmp2(5, 5, 5, 4), Greater); - } - - #[test] fn test_int_totaleq() { assert!(5.equals(&5)); assert!(!2.equals(&17)); |
