diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-03 19:59:04 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-05 22:08:09 -0700 |
| commit | 025d86624de982cdab7e6b13600fec1499c02b56 (patch) | |
| tree | 96ba196f8a420c52e6034acd14f323d3d2239e29 /src/libcore/uint-template.rs | |
| parent | c9d27693796fe4ced8568e11aa465750f743097b (diff) | |
Switch alts to use arrows
Diffstat (limited to 'src/libcore/uint-template.rs')
| -rw-r--r-- | src/libcore/uint-template.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index d3e1fb41ca2..d3b0e8cea24 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -128,8 +128,8 @@ fn parse_buf(buf: ~[u8], radix: uint) -> option<T> { let mut n = 0u as T; loop { alt char::to_digit(buf[i] as char, radix) { - some(d) { n += d as T * power; } - none { return none; } + some(d) => n += d as T * power, + none => return none } power *= radix as T; if i == 0u { return some(n); } @@ -147,8 +147,8 @@ fn from_str_radix(buf: ~str, radix: u64) -> option<u64> { let mut power = 1u64, n = 0u64; loop { alt char::to_digit(buf[i] as char, radix as uint) { - some(d) { n += d as u64 * power; } - none { return none; } + some(d) => n += d as u64 * power, + none => return none } power *= radix; if i == 0u { return some(n); } |
