Skip to content

drop some redundant Ord method implementations #8862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/libextra/json.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -1164,9 +1164,6 @@ impl Ord for Json {
}
}
}
fn le(&self, other: &Json) -> bool { !(*other).lt(&(*self)) }
fn ge(&self, other: &Json) -> bool { !(*self).lt(other) }
fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self)) }
}

/// A trait for converting values to JSON
Expand Down
14 changes: 1 addition & 13 deletions src/libextra/semver.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -37,18 +37,6 @@ impl cmp::Ord for Identifier {
(&AlphaNumeric(_), _) => false
}
}
#[inline]
fn le(&self, other: &Identifier) -> bool {
! (other < self)
}
#[inline]
fn gt(&self, other: &Identifier) -> bool {
other < self
}
#[inline]
fn ge(&self, other: &Identifier) -> bool {
! (self < other)
}
}

impl ToStr for Identifier {
Expand Down