From ecaf9e39c9435fa2de4fe393c4b263be36eb2d99 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 6 Aug 2012 12:34:08 -0700 Subject: Convert alt to match. Stop parsing alt --- src/libcore/uint-template.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcore/uint-template.rs') diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index d3b0e8cea24..a0feaf3ed9d 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -127,7 +127,7 @@ fn parse_buf(buf: ~[u8], radix: uint) -> option { let mut power = 1u as T; let mut n = 0u as T; loop { - alt char::to_digit(buf[i] as char, radix) { + match char::to_digit(buf[i] as char, radix) { some(d) => n += d as T * power, none => return none } @@ -146,7 +146,7 @@ fn from_str_radix(buf: ~str, radix: u64) -> option { let mut i = str::len(buf) - 1u; let mut power = 1u64, n = 0u64; loop { - alt char::to_digit(buf[i] as char, radix as uint) { + match char::to_digit(buf[i] as char, radix as uint) { some(d) => n += d as u64 * power, none => return none } -- cgit 1.4.1-3-g733a5