Skip to content

Commit daa642a

Browse files
committed
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.
2 parents b8ceb2d + 2f61036 commit daa642a

0 file changed

File tree

    0 commit comments

    Comments
     (0)