about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/strconv.rs6
-rw-r--r--src/libstd/num/uint_macros.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index b1f4e5acb93..febdf5f6118 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -104,7 +104,7 @@ fn int_to_str_bytes_common<T, F>(num: T, radix: uint, sign: SignFormat, mut f: F
     // This is just for integral types, the largest of which is a u64. The
     // smallest base that we can have is 2, so the most number of digits we're
     // ever going to have is 64
-    let mut buf = [0u8, ..64];
+    let mut buf = [0u8; 64];
     let mut cur = 0;
 
     // Loop at least once to make sure at least a `0` gets emitted.
@@ -321,10 +321,10 @@ pub fn float_to_str_bytes_common<T: Float>(
         // cut off the one extra digit, and depending on its value
         // round the remaining ones.
         if limit_digits && dig == digit_count {
-            let ascii2value = |chr: u8| {
+            let ascii2value = |&: chr: u8| {
                 (chr as char).to_digit(radix).unwrap()
             };
-            let value2ascii = |val: uint| {
+            let value2ascii = |&: val: uint| {
                 char::from_digit(val, radix).unwrap() as u8
             };
 
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs
index 61fd754018e..b52e4fda7af 100644
--- a/src/libstd/num/uint_macros.rs
+++ b/src/libstd/num/uint_macros.rs
@@ -38,7 +38,7 @@ pub fn to_str_bytes<U, F>(n: $T, radix: uint, f: F) -> U where
     use io::{Writer, Seek};
     // The radix can be as low as 2, so we need at least 64 characters for a
     // base 2 number, and then we need another for a possible '-' character.
-    let mut buf = [0u8, ..65];
+    let mut buf = [0u8; 65];
     let amt = {
         let mut wr = ::io::BufWriter::new(&mut buf);
         (write!(&mut wr, "{}", ::fmt::radix(n, radix as u8))).unwrap();