// 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
};
}
// 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);