♫ Christian Krause ♫
♫ Christian Krause ♫
i.e. if you want context, use any of the error-chain libraries, but keep error messages clean? would you still recommend to add *some* context, e.g. if opening a file failed,...
This seems rather ad-hoc to me. I would prefer explicitly naming the unit rather than having this be done ad-hoc with formatting specifiers.
I highly recommend using an enum with SI and IEC variants instead of a bool, as this is so much clearer in code.
Will be fixed in f16ba51056fcf370548c661f35fe523fa6e03d59 of #15.
@hyunsik The Travis failure is due to: ```console $ cargo fmt --all -- --write-mode=diff Unrecognized option: 'write-mode' ```
Thanks for catching the `println` statements. Rebased.
At the moment, I added a new function `to_simple_string_as` to `ByteSize` and a new argument to the `to_string` stand-alone function. Note that this can be done differently, e.g. adding the...
I guess, I would prefer an even higher-level approach: ```rust enum OutputFormat { SI, // 1000, e.g. "32 KB" IEC, // 1024, e.g. "32 KiB" Sort, // 1024, e.g. "32K"...
@hyunsik I've finally gotten around to implementing my idea from my last comment.
Great to see prometheus/procfs#341 seems to fix it. Waiting for next prometheus/node_exporter release to confirm.