cargo: Fix some lack of knowledge of basic algebraic identities
This commit is contained in:
parent
45e46f5fc0
commit
9518fc79ea
3 changed files with 12 additions and 69 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue