diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-24 11:39:17 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-24 11:45:31 +0200 |
commit | 324ddec41d474bb4840a2b76db48b5f97ed65889 (patch) | |
tree | b5bd36bb1a4cc59fdf4996c6b1fa90578127255b /src/main.rs | |
parent | feat(cli/selectCommand/file): Allow re-use of the previous selection file (diff) | |
download | yt-324ddec41d474bb4840a2b76db48b5f97ed65889.tar.gz yt-324ddec41d474bb4840a2b76db48b5f97ed65889.zip |
fix(treewide): Always display bytes in a formatted way through `Bytes`
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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?; |