From ddb4e43fa51de0186b6bab12353cb25f5e785a4f Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 30 Dec 2014 20:23:24 -0500 Subject: [PATCH] core: unbox closures used in let bindings --- src/libcore/fmt/float.rs | 4 ++-- src/libcore/fmt/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs index 3787ae33fdaa..d3b1d8efe8bf 100644 --- a/src/libcore/fmt/float.rs +++ b/src/libcore/fmt/float.rs @@ -225,10 +225,10 @@ pub fn float_to_str_bytes_common( // 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/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 9d275c9da9cb..95753f4b671d 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -398,7 +398,7 @@ impl<'a> Formatter<'a> { } // 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);