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-12-05 19:22:48 -0800
committerBrian Anderson <banderson@mozilla.com>2012-12-05 19:23:13 -0800
commit4ab1c8805aee4b6a4254fd90695371a06cbcd301 (patch)
treedab4555175a51694f1e5fa31d986e3a851b089a1 /src/libcore/uint-template.rs
parente23ea24aed95885c8bc59de49c616f60fa5053d1 (diff)
Convert Num to explicit self
Diffstat (limited to 'src/libcore/uint-template.rs')
-rw-r--r--src/libcore/uint-template.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs
index 17f76619583..8a03b0f94bc 100644
--- a/src/libcore/uint-template.rs
+++ b/src/libcore/uint-template.rs
@@ -73,14 +73,14 @@ impl T : Eq {
 }
 
 impl T: num::Num {
-    pure fn add(other: &T)    -> T { return self + *other; }
-    pure fn sub(other: &T)    -> T { return self - *other; }
-    pure fn mul(other: &T)    -> T { return self * *other; }
-    pure fn div(other: &T)    -> T { return self / *other; }
-    pure fn modulo(other: &T) -> T { return self % *other; }
-    pure fn neg()              -> T { return -self;        }
-
-    pure fn to_int()         -> int { return self as int; }
+    pure fn add(&self, other: &T)    -> T { return *self + *other; }
+    pure fn sub(&self, other: &T)    -> T { return *self - *other; }
+    pure fn mul(&self, other: &T)    -> T { return *self * *other; }
+    pure fn div(&self, other: &T)    -> T { return *self / *other; }
+    pure fn modulo(&self, other: &T) -> T { return *self % *other; }
+    pure fn neg(&self)              -> T { return -*self;        }
+
+    pure fn to_int(&self)         -> int { return *self as int; }
     static pure fn from_int(n: int) -> T   { return n as T;      }
 }