From 48393b209396db9ddd44251b2bb445d3ad7533fb Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Thu, 25 May 2023 17:23:52 +0200 Subject: changed a whole lot og references, fuck rust --- src/files.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/files.rs') diff --git a/src/files.rs b/src/files.rs index 04b00f0..565d2b6 100644 --- a/src/files.rs +++ b/src/files.rs @@ -14,11 +14,9 @@ use crate::{ db::{mods_get_info, userlist_add_disabled_versions}, error::{ErrorType, MLError, MLE}, modrinth::Version, - List, + List, PROGRESS_CHARS, }; -const PROGRESS_CHARS: &str = "#>-"; - pub async fn download_versions(list: List, config: Cfg, versions: Vec) -> MLE<()> { let cached = get_cached_versions(&config.cache); @@ -89,7 +87,7 @@ async fn download_version(config: Cfg, list: List, version: Version, mut cached: progress.set_message(format!("Copy {} to cache", version.id)); let dl_path_file = format!("{}/{}", list.download_folder, filename); - let cache_path = format!("{}/{}", &config.clone().cache, filename); + let cache_path = format!("{}/{}", &config.cache, filename); copy(dl_path_file, cache_path)?; } @@ -135,7 +133,7 @@ async fn download_file(url: &str, path: &str, name: &str, progress: &ProgressBar } pub fn disable_version( - config: Cfg, + config: &Cfg, current_list: List, versionid: String, mod_id: String, -- cgit v1.2.3