diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 21f2a30..a478ec7 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -1,9 +1,11 @@ | |||
1 | #![allow(clippy::too_many_lines)] | ||
2 | |||
1 | use clap::{Parser, Subcommand}; | 3 | use clap::{Parser, Subcommand}; |
2 | use modlist::{ | 4 | use modlist::{ |
3 | config::Cfg, | 5 | config::Cfg, |
4 | db::{config_get_current_list, lists_get, lists_get_all_ids}, | 6 | db::{config_get_current_list, lists_get, lists_get_all_ids}, |
5 | download, export, get_current_list, import, list_add, list_change, | 7 | download, export, get_current_list, import, list_add, list_change, |
6 | list_list, list_remove, list_version, mod_add, mod_remove, update, AddMod, | 8 | list_lists, list_remove, list_version, mod_add, mod_remove, update, AddMod, |
7 | IDSelector, List, Modloader, VersionLevel, | 9 | IDSelector, List, Modloader, VersionLevel, |
8 | }; | 10 | }; |
9 | 11 | ||
@@ -178,9 +180,10 @@ async fn main() { | |||
178 | .unwrap(), | 180 | .unwrap(), |
179 | }; | 181 | }; |
180 | 182 | ||
181 | let marked_id = match version { | 183 | let marked_id = if version { |
182 | true => IDSelector::VersionID(id), | 184 | IDSelector::VersionID(id) |
183 | false => IDSelector::ModificationID(id), | 185 | } else { |
186 | IDSelector::ModificationID(id) | ||
184 | }; | 187 | }; |
185 | 188 | ||
186 | let add_id = AddMod { | 189 | let add_id = AddMod { |
@@ -235,7 +238,7 @@ async fn main() { | |||
235 | list_add(&config, &id, &ver, &ml, &directory) | 238 | list_add(&config, &id, &ver, &ml, &directory) |
236 | } | 239 | } |
237 | ListCommands::Remove { id } => list_remove(&config, &id), | 240 | ListCommands::Remove { id } => list_remove(&config, &id), |
238 | ListCommands::List => list_list(&config), | 241 | ListCommands::List => list_lists(&config), |
239 | ListCommands::Change { id } => list_change(&config, &id), | 242 | ListCommands::Change { id } => list_change(&config, &id), |
240 | ListCommands::Version { | 243 | ListCommands::Version { |
241 | id, | 244 | id, |