about summary refs log tree commit diff
path: root/src/libcore/uint-template.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-08-29 19:23:15 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-08-29 19:23:15 -0700
commita1c11cab2dc56483cf9fe6d25af43b2f602d5155 (patch)
tree7eb884301bb31d4bed8d99c26cd38109b64ac41e /src/libcore/uint-template.rs
parent70d3633c0b66c247b97f721653d33264ddfc680f (diff)
rustc: Make `<=`, `>=`, and `>` use traits as well
Diffstat (limited to 'src/libcore/uint-template.rs')
-rw-r--r--src/libcore/uint-template.rs7
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 {