From 6a90e80b6240d8213f2b99fa470ef6ee04552d1b Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 20 Sep 2013 02:08:47 -0400 Subject: option: rewrite the API to use composition --- src/libextra/num/bigint.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libextra/num') diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index 8604674ea12..ed68f3162aa 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -698,7 +698,7 @@ impl BigUint { #[inline] pub fn new(v: ~[BigDigit]) -> BigUint { // omit trailing zeros - let new_len = v.iter().rposition(|n| *n != 0).map_move_default(0, |p| p + 1); + let new_len = v.iter().rposition(|n| *n != 0).map_default(0, |p| p + 1); if new_len == v.len() { return BigUint { data: v }; } let mut v = v; @@ -1417,7 +1417,7 @@ impl BigInt { start = 1; } return BigUint::parse_bytes(buf.slice(start, buf.len()), radix) - .map_move(|bu| BigInt::from_biguint(sign, bu)); + .map(|bu| BigInt::from_biguint(sign, bu)); } /// Converts this `BigInt` into a `BigUint`, if it's not negative. @@ -2507,7 +2507,7 @@ mod bigint_tests { #[test] fn test_from_str_radix() { fn check(s: &str, ans: Option) { - let ans = ans.map_move(|n| { + let ans = ans.map(|n| { let x: BigInt = FromPrimitive::from_int(n).unwrap(); x }); -- cgit 1.4.1-3-g733a5