From 324ddec41d474bb4840a2b76db48b5f97ed65889 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 24 Aug 2024 11:39:17 +0200 Subject: fix(treewide): Always display bytes in a formatted way through `Bytes` --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0f22c22..7febefc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,6 +12,7 @@ use std::{collections::HashMap, fs, sync::Arc, u8}; use anyhow::{bail, Context, Result}; use app::App; +use bytes::Bytes; use cache::invalidate; use clap::Parser; use cli::{CacheCommand, CheckCommand, SelectCommand, SubscriptionCommand, VideosCommand}; @@ -82,8 +83,9 @@ async fn main() -> Result<()> { force, max_cache_size, } => { - let max_cache_size = max_cache_size.unwrap_or(app.config.download.max_cache_size); - info!("max cache size: '{}'", max_cache_size); + let max_cache_size = + max_cache_size.unwrap_or(app.config.download.max_cache_size.as_u64()); + info!("Max cache size: '{}'", Bytes::new(max_cache_size)); if force { invalidate(&app, true).await?; -- cgit 1.4.1