diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-09-20 02:08:47 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-10-09 09:17:29 -0400 |
| commit | 6a90e80b6240d8213f2b99fa470ef6ee04552d1b (patch) | |
| tree | e7ae38c849741fc9345652311dfa374f36b4be9a /src/libextra/num | |
| parent | f647ccc79c38c1f80dbdb697900b2ba97e293263 (diff) | |
| download | rust-6a90e80b6240d8213f2b99fa470ef6ee04552d1b.tar.gz rust-6a90e80b6240d8213f2b99fa470ef6ee04552d1b.zip | |
option: rewrite the API to use composition
Diffstat (limited to 'src/libextra/num')
| -rw-r--r-- | src/libextra/num/bigint.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<int>) { - let ans = ans.map_move(|n| { + let ans = ans.map(|n| { let x: BigInt = FromPrimitive::from_int(n).unwrap(); x }); |
