]> git.lizzy.rs Git - rust.git/commitdiff
core: unbox closures used in let bindings
authorJorge Aparicio <japaricious@gmail.com>
Wed, 31 Dec 2014 01:23:24 +0000 (20:23 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Thu, 1 Jan 2015 03:50:26 +0000 (22:50 -0500)
src/libcore/fmt/float.rs
src/libcore/fmt/mod.rs

index 3787ae33fdaad39d448e241bbf2f39aa87e104be..d3b1d8efe8bfc889f06d6ee4993c7a59ee6da071 100644 (file)
@@ -225,10 +225,10 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
         // 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
             };
 
index 9d275c9da9cb377c3e986a5371bd5ee80201c437..95753f4b671d5c24480e02b6c34437920f4c7095 100644 (file)
@@ -398,7 +398,7 @@ pub fn pad_integral(&mut self,
         }
 
         // Writes the sign if it exists, and then the prefix if it was requested
-        let write_prefix = |f: &mut Formatter| {
+        let write_prefix = |&: f: &mut Formatter| {
             for c in sign.into_iter() {
                 let mut b = [0, ..4];
                 let n = c.encode_utf8(&mut b).unwrap_or(0);