diff options
Diffstat (limited to 'src/download')
-rw-r--r-- | src/download/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/download/mod.rs b/src/download/mod.rs index ad807f6..2a19a3a 100644 --- a/src/download/mod.rs +++ b/src/download/mod.rs @@ -8,7 +8,7 @@ // You should have received a copy of the License along with this program. // If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -use std::{collections::HashMap, sync::Arc, time::Duration}; +use std::{collections::HashMap, str::FromStr, sync::Arc, time::Duration}; use crate::{ app::App, @@ -24,7 +24,7 @@ use crate::{ use anyhow::{bail, Context, Result}; use bytes::Bytes; use futures::{future::BoxFuture, FutureExt}; -use log::{debug, info, warn}; +use log::{debug, error, info, warn}; use tokio::{fs, task::JoinHandle, time}; mod download_options; @@ -156,8 +156,8 @@ impl Downloader { } let val = dir_size(fs::read_dir(&app.config.paths.download_dir).await?).await; - if let Ok(val) = val.as_ref() { - info!("Cache dir has a size of '{}'", val); + if let Ok(val) = val { + info!("Cache dir has a size of '{}'", Bytes::new(val)); } val } |