mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
ff21ccfba1
Fix the example code and doctest for Formatter::sign_plus The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers. This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@07872f28cd | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@42df7394d3 | ||
test | ||
unwind |