From 29c3640e5fea0f423357c28e3c221fcaca004ee8 Mon Sep 17 00:00:00 2001 From: Naz Date: Thu, 31 Jul 2025 15:46:40 +0100 Subject: =?UTF-8?q?=E2=9C=A8feat:=20use=20the=20custom=20Result=20type=20i?= =?UTF-8?q?nstead=20of=20the=20standard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/downloader.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/downloader.rs') diff --git a/src/downloader.rs b/src/downloader.rs index 2196e25..be35bd8 100644 --- a/src/downloader.rs +++ b/src/downloader.rs @@ -2,7 +2,7 @@ use futures_util::StreamExt; use std::path::PathBuf; use tokio::{fs, io::AsyncWriteExt}; -use crate::{appimages_dir, make_progress_bar}; +use crate::{Result, appimages_dir, make_progress_bar}; #[derive(Debug, Default)] pub struct Downloader {} @@ -20,11 +20,7 @@ impl Downloader { appimages_dir().join(filename) } - pub async fn download_with_progress( - &self, - url: &str, - path: &PathBuf, - ) -> Result<(), Box> { + pub async fn download_with_progress(&self, url: &str, path: &PathBuf) -> Result<()> { fs::create_dir_all(&appimages_dir()).await?; let resp = reqwest::get(&url.to_string()).await?; -- cgit v1.2.3