After trying #36 I found that it does not handle alignment correctly.
I therefore reimplemented it with number-like width/padding formatting and some more tests.
This uses fmt::Formatter::pad_integral, which is intended for integrals but works perfectly fine for decimals if precision is handled before. If required I also have an implementation which does not use pad_integral, but it requires nightly to get access to the format alignments.
After trying #36 I found that it does not handle alignment correctly.
I therefore reimplemented it with number-like width/padding formatting and some more tests.
This uses
fmt::Formatter::pad_integral
, which is intended for integrals but works perfectly fine for decimals if precision is handled before. If required I also have an implementation which does not use pad_integral, but it requires nightly to get access to the format alignments.