From 5326d48f6e0a88ad42005c39b73f7baaf91c9b86 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 28 Dec 2022 13:15:10 +0100 Subject: added devdir; better config dir --- src/files.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/files.rs') diff --git a/src/files.rs b/src/files.rs index b1e537c..a3f838a 100644 --- a/src/files.rs +++ b/src/files.rs @@ -28,7 +28,7 @@ async fn download_file(url: String, path: String, name: String) -> Result<(), Bo .await?; // download chunks - let mut file = File::create(String::from(&dl_path_file))?; + let mut file = File::create(&dl_path_file)?; let mut stream = res.bytes_stream(); while let Some(item) = stream.next().await { @@ -78,7 +78,7 @@ pub fn get_file_path(list: List, versionid: String) -> Result Result, Box> { let mut versions: HashMap = HashMap::new(); - for file in read_dir(list.download_folder)? { + for file in read_dir(&list.download_folder)? { let path = file?.path(); if path.is_file() && path.extension().ok_or("BAH")? == "jar" { let pathstr = path.to_str().ok_or("BAH")?; -- cgit v1.2.3