Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #153025 - joboet:bytestr_precision_display, r=Mark-Simulacrum
core: respect precision in `ByteStr` `Display` Fixes rust-lang/rust#153022. `ByteStr`'s `Display` implementation didn't respect the precision parameter. Just like `Formatter::pad`, this is fixed by counting off the characters in the string and truncating after the requested length – with the added complication that the `ByteStr` needs to be divided into chunks first. By including a fast path that avoids counting the characters when no parameters were specified this should also fix the performance regressions caused by rust-lang/rust#152865.
bors 2 months ago
parent 18005ba · parent d21f4bf · commit 8981c4a
0 files changed, 0 insertions, 0 deletions