diff options
| author | Fuwn <[email protected]> | 2021-07-01 01:26:56 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-07-01 01:26:56 -0700 |
| commit | 7f298b1e7499a5f9afbdd333e1278f10dd5480e1 (patch) | |
| tree | 67699fa98591241db6f02c206a7b857e88dbb8c2 /crates | |
| parent | refactor(whirl_api): use the existing `System` to grab uptime instead of cons... (diff) | |
| download | whirl-7f298b1e7499a5f9afbdd333e1278f10dd5480e1.tar.xz whirl-7f298b1e7499a5f9afbdd333e1278f10dd5480e1.zip | |
style(whirl_api): condense line (`cargo fmt`)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/whirl_api/src/routes/stats/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/whirl_api/src/routes/stats/mod.rs b/crates/whirl_api/src/routes/stats/mod.rs index c4172a4..d5efc91 100644 --- a/crates/whirl_api/src/routes/stats/mod.rs +++ b/crates/whirl_api/src/routes/stats/mod.rs @@ -23,9 +23,7 @@ pub fn statistics() -> HttpResponse { system: StatisticsSystem { os_type: sys.name().unwrap(), release: sys.kernel_version().unwrap(), - uptime: whirl_common::system::seconds_to_hrtime( - usize::try_from(sys.uptime()).unwrap(), - ), + uptime: whirl_common::system::seconds_to_hrtime(usize::try_from(sys.uptime()).unwrap()), }, process: StatisticsProcess { // (process.cpu_usage() * 100.0).round() / 100.0 |