bmitch / relogio

Terminal clock in Rust
MIT License
3 stars 2 forks source link

Enforced Leading Zeros on Length-3 Floats / Added Badge to README #14

Closed ntrupin closed 5 years ago

ntrupin commented 5 years ago

Related issues: bmitch/relogio Issue #12, bmitch/relogio Issue #10

Fixed float formatting so that numbers with a length of 3 (such as 9.22) were padded with a leading zero (making it 09.22).

Added a travis-ci build badge to the README to reflect build status.

bmitch commented 5 years ago

Thanks once again!

robbystk commented 5 years ago

In the last commit (e400335213a7f022d24019ba60227adce8d2b830), I'm curious why the two format!s are necessary. I think "{:0>.2}" is sufficient, but maybe there's an edge case I'm missing.

bmitch commented 5 years ago

Thanks @robbystk - to be honest I'm not sure! @ntrupin may be able to speak to this.

However, if you think there's a more efficient way of achieving the same end result please feel free to make a PR by all means!