-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elapsed time larger than 6 digits ignores alignment width #1327
Comments
Thanks for reporting. |
The culprit is "format" method in elapsed_formatter class in "pattern_formatter-inl.h":
I would've actually preferred to get rid of leading zeroes altogether. For me this:
reads easier than this:
My current fix is this:
But it is slower (probably), and breaks backward compatibility (to a significantly greater extent). But I'm just a scrub user, not a library designer, and can afford to not care about the latter. |
@ivan236634452 Fixed. I agree it is more readable, so I changed according to your proposal. It is also few nanos faster! |
Tested in release 1.4.2 and today's v1.x branch. All alignments are affected.
Code to reproduce (right alignment):
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: