core: unbox closures used in let bindings
This commit is contained in:
parent
bcc2120c21
commit
ddb4e43fa5
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue