Replaces the free-standing functions in f32, &c.
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
This commit is contained in:
@@ -58,7 +58,7 @@ class cat : map<int, bool> {
|
||||
fn find(&&k:int) -> Option<bool> { Some(self.get(k)) }
|
||||
fn remove(&&k:int) -> Option<bool> { self.meows -= k; Some(true) }
|
||||
fn each(f: &fn(&&int, &&bool) -> bool) {
|
||||
let mut n = int::abs(self.meows);
|
||||
let mut n = num::abs(self.meows);
|
||||
while n > 0 {
|
||||
if !f(n, true) { break; }
|
||||
n -= 1;
|
||||
|
||||
Reference in New Issue
Block a user