diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-11-02 14:00:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 14:00:58 +0800 |
commit | 16a6f9eec6079a08d31159e296f6009034bd533c (patch) | |
tree | b962fadd053b67a5e0155fc1410631a15050b7cb /src/display/ui.rs | |
parent | cf9b9f063420b153225d4e2ff49e22a2f97dbddf (diff) |
Display bandwidth in different unit families (#328)
* Allow selecting unit families
- Supported units are {binary,SI}-{bytes,bits}
* Fix typo
* Better error msg in the unreachable case
* - I can't believe I did this. Frankly, terrible.
* Add unit test
* Add peta&pebi units to be absolutely future-proof
* Minor code style improvement
Diffstat (limited to 'src/display/ui.rs')
-rw-r--r-- | src/display/ui.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/display/ui.rs b/src/display/ui.rs index 0b0882e..df0978f 100644 --- a/src/display/ui.rs +++ b/src/display/ui.rs @@ -32,6 +32,7 @@ where terminal.hide_cursor().unwrap(); let state = { let mut state = UIState::default(); + state.unit_family = opts.unit_family; state.cumulative_mode = opts.total_utilization; state }; |