summaryrefslogtreecommitdiff
path: root/src/downloader.rs
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-07-31 15:46:40 +0100
committerNaz <ndpm13@ch-naseem.com>2025-07-31 15:46:40 +0100
commit29c3640e5fea0f423357c28e3c221fcaca004ee8 (patch)
treea7f774b1f58ccb3070fd3b0f7d3dad1e524bc40d /src/downloader.rs
parentbd230c3d916be2af8f97e587f3f764800077cba4 (diff)
✨feat: use the custom Result type instead of the standard
Diffstat (limited to 'src/downloader.rs')
-rw-r--r--src/downloader.rs8
1 files changed, 2 insertions, 6 deletions
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<dyn std::error::Error>> {
+ 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?;