summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index f388a82..a1f0c31 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,8 +4,7 @@ use modlist::{
4 db::{config_get_current_list, lists_get, lists_get_all_ids}, 4 db::{config_get_current_list, lists_get, lists_get_all_ids},
5 download, 5 download,
6 error::MLE, 6 error::MLE,
7 export, get_current_list, import, list_add, list_change, list_lists, 7 export, import, mod_add, mod_remove, update, AddMod, IDSelector,
8 list_remove, list_version, mod_add, mod_remove, update, AddMod, IDSelector,
9 List, Modloader, VersionLevel, 8 List, Modloader, VersionLevel,
10}; 9};
11 10
@@ -184,7 +183,7 @@ async fn main() {
184 } else { 183 } else {
185 let current = match list { 184 let current = match list {
186 Some(l) => lists_get(&config, &l).unwrap(), 185 Some(l) => lists_get(&config, &l).unwrap(),
187 None => get_current_list(&config).unwrap(), 186 None => List::get_current_list(&config).unwrap(),
188 }; 187 };
189 liststack.push(current); 188 liststack.push(current);
190 } 189 }
@@ -206,7 +205,7 @@ async fn main() {
206 } else { 205 } else {
207 let current = match list { 206 let current = match list {
208 Some(l) => lists_get(&config, &l).unwrap(), 207 Some(l) => lists_get(&config, &l).unwrap(),
209 None => get_current_list(&config).unwrap(), 208 None => List::get_current_list(&config).unwrap(),
210 }; 209 };
211 liststack.push(current); 210 liststack.push(current);
212 } 211 }
@@ -309,16 +308,16 @@ async fn handle_list(
309 .unwrap(), 308 .unwrap(),
310 }; 309 };
311 310
312 list_add(&config, &id, &ver, &ml, &directory) 311 List::add(&config, &id, &ver, &ml, &directory)
313 } 312 }
314 ListCommands::Remove { id } => list_remove(&config, &id), 313 ListCommands::Remove { id } => List::remove(&config, &id),
315 ListCommands::List => list_lists(&config), 314 ListCommands::List => List::list(&config),
316 ListCommands::Change { id } => list_change(&config, &id), 315 ListCommands::Change { id } => List::change(&config, &id),
317 ListCommands::Version { 316 ListCommands::Version {
318 id, 317 id,
319 version, 318 version,
320 download, 319 download,
321 remove, 320 remove,
322 } => list_version(&config, &id, version, download, remove).await, 321 } => List::version(&config, &id, version, download, remove).await,
323 } 322 }
324} 323}