match config.line_length {
Some(line_length) =>
if cur_length >= line_length {
- v.push('\r' as u8);
- v.push('\n' as u8);
+ v.push(b'\r');
+ v.push(b'\n');
cur_length = 0;
},
None => ()
match config.line_length {
Some(line_length) =>
if cur_length >= line_length {
- v.push('\r' as u8);
- v.push('\n' as u8);
+ v.push(b'\r');
+ v.push(b'\n');
},
None => ()
}
v.push(bytes[((n >> 18) & 63) as uint]);
v.push(bytes[((n >> 12) & 63) as uint]);
if config.pad {
- v.push('=' as u8);
- v.push('=' as u8);
+ v.push(b'=');
+ v.push(b'=');
}
}
2 => {
v.push(bytes[((n >> 12) & 63) as uint]);
v.push(bytes[((n >> 6 ) & 63) as uint]);
if config.pad {
- v.push('=' as u8);
+ v.push(b'=');
}
}
_ => fail!("Algebra is broken, please alert the math police")
buf <<= 4;
match byte as char {
- 'A'..'F' => buf |= byte - ('A' as u8) + 10,
- 'a'..'f' => buf |= byte - ('a' as u8) + 10,
- '0'..'9' => buf |= byte - ('0' as u8),
+ 'A'..'F' => buf |= byte - b'A' + 10,
+ 'a'..'f' => buf |= byte - b'a' + 10,
+ '0'..'9' => buf |= byte - b'0',
' '|'\r'|'\n'|'\t' => {
buf >>= 4;
continue