diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-29 19:23:15 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-29 19:23:15 -0700 |
| commit | a1c11cab2dc56483cf9fe6d25af43b2f602d5155 (patch) | |
| tree | 7eb884301bb31d4bed8d99c26cd38109b64ac41e /src/libcore/uint-template.rs | |
| parent | 70d3633c0b66c247b97f721653d33264ddfc680f (diff) | |
rustc: Make `<=`, `>=`, and `>` use traits as well
Diffstat (limited to 'src/libcore/uint-template.rs')
| -rw-r--r-- | src/libcore/uint-template.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index f95848f2496..5119a5dd562 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -61,9 +61,10 @@ pure fn compl(i: T) -> T { } impl T: Ord { - pure fn lt(&&other: T) -> bool { - return self < other; - } + pure fn lt(&&other: T) -> bool { self < other } + pure fn le(&&other: T) -> bool { self <= other } + pure fn ge(&&other: T) -> bool { self >= other } + pure fn gt(&&other: T) -> bool { self > other } } impl T: Eq { |
