about summary refs log tree commit diff
path: root/src/libcore/uint-template.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-06-25 13:41:13 -0700
committerBrian Anderson <banderson@mozilla.com>2012-06-25 14:25:48 -0700
commit7e6cbf7431671ecdfe60f7ec9fdd5af65248a7a2 (patch)
tree970ecf66dd2a057824ef8db83532c37fbba66894 /src/libcore/uint-template.rs
parent43a48ca5bba2698e253d6229139328d353276ee8 (diff)
Remove redundant 'extension' mods from numeric mods
Diffstat (limited to 'src/libcore/uint-template.rs')
-rw-r--r--src/libcore/uint-template.rs25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs
index 5d8c9415a77..d341921eb03 100644
--- a/src/libcore/uint-template.rs
+++ b/src/libcore/uint-template.rs
@@ -1,6 +1,5 @@
 import T = inst::T;
 import cmp::{eq, ord};
-import num::num;
 
 export min_value, max_value;
 export min, max;
@@ -12,7 +11,7 @@ export range;
 export compl;
 export to_str, to_str_bytes;
 export from_str, from_str_radix, str, parse_buf;
-export ord, eq, extensions;
+export num, ord, eq;
 
 const min_value: T = 0 as T;
 const max_value: T = 0 as T - 1 as T;
@@ -65,18 +64,16 @@ impl eq of eq for T {
     }
 }
 
-mod extensions {
-    impl num of num::num for T {
-        fn add(&&other: T)    -> T { ret self + other; }
-        fn sub(&&other: T)    -> T { ret self - other; }
-        fn mul(&&other: T)    -> T { ret self * other; }
-        fn div(&&other: T)    -> T { ret self / other; }
-        fn modulo(&&other: T) -> T { ret self % other; }
-        fn neg()              -> T { ret -self;        }
-
-        fn to_int()         -> int { ret self as int; }
-        fn from_int(n: int) -> T   { ret n as T;      }
-    }
+impl num of num::num for T {
+    fn add(&&other: T)    -> T { ret self + other; }
+    fn sub(&&other: T)    -> T { ret self - other; }
+    fn mul(&&other: T)    -> T { ret self * other; }
+    fn div(&&other: T)    -> T { ret self / other; }
+    fn modulo(&&other: T) -> T { ret self % other; }
+    fn neg()              -> T { ret -self;        }
+
+    fn to_int()         -> int { ret self as int; }
+    fn from_int(n: int) -> T   { ret n as T;      }
 }
 
 #[doc = "