summaryrefslogtreecommitdiff
path: root/src/commands/download.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/download.rs')
-rw-r--r--src/commands/download.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/download.rs b/src/commands/download.rs
index 6831714..fea3f34 100644
--- a/src/commands/download.rs
+++ b/src/commands/download.rs
@@ -9,13 +9,13 @@ use crate::{
9 modrinth::get_raw_versions, 9 modrinth::get_raw_versions,
10}; 10};
11 11
12pub async fn download(config: Cfg, liststack: Vec<List>, clean: bool, delete_old: bool) -> MLE<()> { 12pub async fn download(config: &Cfg, liststack: Vec<List>, clean: bool, delete_old: bool) -> MLE<()> {
13 for current_list in liststack { 13 for current_list in liststack {
14 println!("Downloading current versions of mods in {}", current_list.id); 14 println!("Downloading current versions of mods in {}", current_list.id);
15 let downloaded_versions = get_downloaded_versions(current_list.clone())?; 15 let downloaded_versions = get_downloaded_versions(current_list.clone())?;
16 // println!("To download: {:#?}", downloaded_versions); 16 // println!("To download: {:#?}", downloaded_versions);
17 let current_version_ids = match userlist_get_all_current_versions_with_mods( 17 let current_version_ids = match userlist_get_all_current_versions_with_mods(
18 config.clone(), 18 config,
19 String::from(&current_list.id), 19 String::from(&current_list.id),
20 ) { 20 ) {
21 Ok(i) => Ok(i), 21 Ok(i) => Ok(i),
@@ -66,7 +66,7 @@ pub async fn download(config: Cfg, liststack: Vec<List>, clean: bool, delete_old
66 // println!("Deleting version {} for mod {}", ver.1, ver.0); 66 // println!("Deleting version {} for mod {}", ver.1, ver.0);
67 delete_version(current_list.clone(), ver.1)?; 67 delete_version(current_list.clone(), ver.1)?;
68 } else { 68 } else {
69 disable_version(config.clone(), current_list.clone(), ver.1, ver.0)?; 69 disable_version(config, current_list.clone(), ver.1, ver.0)?;
70 }; 70 };
71 } 71 }
72 } 72 }