]> git.lizzy.rs Git - rust.git/commit
Implement rounding for `Duration`s Debug output
authorLukas Kalbertodt <lukas.kalbertodt@gmail.com>
Wed, 16 May 2018 12:46:37 +0000 (14:46 +0200)
committerLukas Kalbertodt <lukas.kalbertodt@gmail.com>
Wed, 16 May 2018 12:46:37 +0000 (14:46 +0200)
commit2a28ac31e9abe0a01861bfffed85872431cc6b72
treed652d7cf0dc36ccaf103b99b14b5c908097d3684
parent9eeb13fdd1c10de7f489e7fc910686c6d492398e
Implement rounding for `Duration`s Debug output

Rounding is done like for printing floating point numbers. If the
first digit which isn't printed (due to the precision parameter) is
larger than '4', the number is rounded up.
src/libcore/tests/time.rs
src/libcore/time.rs