core: unbox closures used in let bindings

This commit is contained in:
Jorge Aparicio 2014-12-30 20:23:24 -05:00
parent bcc2120c21
commit ddb4e43fa5
2 changed files with 3 additions and 3 deletions

View 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
};

View file

@ -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);