Rollup merge of #44158 - dtolnay:zero48, r=sfackler
Use a byte literal ASCII 0 instead of its decimal value @SimonSapin noticed this in https://github.com/dtolnay/itoa/pull/8.
This commit is contained in:
commit
be0ac0124c
@ -242,7 +242,7 @@ macro_rules! impl_Display {
|
||||
// decode last 1 or 2 chars
|
||||
if n < 10 {
|
||||
curr -= 1;
|
||||
*buf_ptr.offset(curr) = (n as u8) + 48;
|
||||
*buf_ptr.offset(curr) = (n as u8) + b'0';
|
||||
} else {
|
||||
let d1 = n << 1;
|
||||
curr -= 2;
|
||||
|
Loading…
Reference in New Issue
Block a user