Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to make the codebase of
stat
a bit nicer to work with. It consists of a couple of changes which I hope are relatively uncontroversial.stat.rs
so that we don't have to putpub
in front of everything.u8
, I made aFlags
struct with somebool
fields. Also the case of no precision being provided is now modeled withNone
instead of-1
.format!
calls are preferred over some custom formatting function (e.g.extend_digits
).OutputType
now carries it's data in the original form (e.g. asu64
) instead of as a preformatted string. This unifies all the formatting toprint_it
, instead of being scattered betweenprint_it
anddo_stat
.I think there's more to do, but I'm going to leave it here for this PR so it won't become too big.