diff options
| author | bors <bors@rust-lang.org> | 2022-03-22 08:47:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-22 08:47:16 +0000 |
| commit | 3ea44938e21f0de8ae7d4f6399a8a30f97867c70 (patch) | |
| tree | 832602b0937476f5c5c52c78f71454a3808c8a88 | |
| parent | b9c406741780945de12aa0e3b2c8ccd99a5e6316 (diff) | |
| parent | 7e3fd5957b49f4efdcf400ccde1324beb8876448 (diff) | |
| download | rust-3ea44938e21f0de8ae7d4f6399a8a30f97867c70.tar.gz rust-3ea44938e21f0de8ae7d4f6399a8a30f97867c70.zip | |
Auto merge of #95107 - r00ster91:fmt, r=joshtriplett
Improve formatting in macro CC `@dtolnay`
| -rw-r--r-- | library/core/src/fmt/num.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/fmt/num.rs b/library/core/src/fmt/num.rs index 05ca50a97a6..25789d37c26 100644 --- a/library/core/src/fmt/num.rs +++ b/library/core/src/fmt/num.rs @@ -317,10 +317,10 @@ macro_rules! impl_Exp { } (fmt_prec.saturating_sub(prec), prec.saturating_sub(fmt_prec)) } - None => (0,0) + None => (0, 0) }; for _ in 1..subtracted_precision { - n/=10; + n /= 10; exponent += 1; } if subtracted_precision != 0 { @@ -392,7 +392,7 @@ macro_rules! impl_Exp { // SAFETY: In either case, `exp_buf` is written within bounds and `exp_ptr[..len]` // is contained within `exp_buf` since `len <= 3`. let exp_slice = unsafe { - *exp_ptr.offset(0) = if upper {b'E'} else {b'e'}; + *exp_ptr.offset(0) = if upper { b'E' } else { b'e' }; let len = if exponent < 10 { *exp_ptr.offset(1) = (exponent as u8) + b'0'; 2 |
