html terminal
Diffstat (limited to 'src/bot/status.rs')
| -rw-r--r-- | src/bot/status.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bot/status.rs b/src/bot/status.rs index 308ae42..ffc62cf 100644 --- a/src/bot/status.rs +++ b/src/bot/status.rs @@ -42,7 +42,7 @@ pub fn humanize_bytes<T: Into<Size>>(bytes: T) -> String { return "0 B".to_string(); } - let base = size.log10() / UNIT.log10(); + let base = size.log(UNIT); let result = format!("{:.1}", UNIT.powf(base - base.floor()),) .trim_end_matches(".0") @@ -70,7 +70,7 @@ pub async fn command(ctx: Context<'_>) -> Result<()> { } let block = tokio::select! { block = get_nextblock() => block, - _ = sleep(Duration::from_secs(5)) => fail!(ctx, FAIL), + () = sleep(Duration::from_secs(5)) => fail!(ctx, FAIL), }; let Some((tps, mem, pcount)) = parse(&block) else { fail!(ctx, FAIL); |