holmgr / cargo-sweep

A cargo subcommand for cleaning up unused build files generated by Cargo
MIT License
693 stars 31 forks source link

Don't display too many decimal places in format_bytes #33

Closed mdboom closed 4 years ago

mdboom commented 4 years ago

Thanks for this tool. It's really handy!

On first running it, I saw:

[INFO] Cleaned 859.8648061752319 MiB

which doesn't make a ton of sense because it talks about fractions of a byte.

Two decimal places seems like enough for a human-readable value like this.

Eh2406 commented 4 years ago

Great thanks!

Eh2406 commented 4 years ago

Oops. I merged without waiting for CI. Can You make a new PR with a fix for the test?

mdboom commented 4 years ago

Oops. I merged without waiting for CI. Can You make a new PR with a fix for the test?

Sure. Working on it now.