about summary refs log tree commit diff
path: root/src/libcore/uint-template.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-06 12:34:08 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-06 15:36:30 -0700
commitecaf9e39c9435fa2de4fe393c4b263be36eb2d99 (patch)
tree775f69be65adff65551d96173dd797e32e2c3157 /src/libcore/uint-template.rs
parentd3a9bb1bd4a1d510bbaca2ab1121e4c85a239247 (diff)
Convert alt to match. Stop parsing alt
Diffstat (limited to 'src/libcore/uint-template.rs')
-rw-r--r--src/libcore/uint-template.rs4
1 files changed, 2 insertions, 2 deletions
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<T> {
     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<u64> {
     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
         }