diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-30 10:39:28 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-30 10:39:28 -0700 |
| commit | 9518fc79eaa9979721abcdb9eaa506a1140cf3fb (patch) | |
| tree | 0c78930df57c3b619bd4065b1ff36c7825f814ef /src/cargo | |
| parent | 45e46f5fc0e78f5855e8870a6e3eb2a0a7e5ae50 (diff) | |
| download | rust-9518fc79eaa9979721abcdb9eaa506a1140cf3fb.tar.gz rust-9518fc79eaa9979721abcdb9eaa506a1140cf3fb.zip | |
cargo: Fix some lack of knowledge of basic algebraic identities
Diffstat (limited to 'src/cargo')
| -rw-r--r-- | src/cargo/cargo.rs | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/cargo/cargo.rs b/src/cargo/cargo.rs index d876a9c679f..9131c07aa55 100644 --- a/src/cargo/cargo.rs +++ b/src/cargo/cargo.rs @@ -42,24 +42,9 @@ impl package : cmp::Ord { if self.versions.lt(other.versions) { return true; } return false; } - pure fn le(&&other: package) -> bool { - if self.name.lt(other.name) { return true; } - if other.name.lt(self.name) { return false; } - if self.uuid.lt(other.uuid) { return true; } - if other.uuid.lt(self.uuid) { return false; } - if self.url.lt(other.url) { return true; } - if other.url.lt(self.url) { return false; } - if self.method.lt(other.method) { return true; } - if other.method.lt(self.method) { return false; } - if self.description.lt(other.description) { return true; } - if other.description.lt(self.description) { return false; } - if self.tags.lt(other.tags) { return true; } - if other.tags.lt(self.tags) { return false; } - if self.versions.le(other.versions) { return true; } - return false; - } - pure fn ge(&&other: package) -> bool { !other.lt(self) } - pure fn gt(&&other: package) -> bool { !other.le(self) } + pure fn le(&&other: package) -> bool { !other.lt(self) } + pure fn ge(&&other: package) -> bool { !self.lt(other) } + pure fn gt(&&other: package) -> bool { other.lt(self) } } type local_package = { |
