summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-05-29 18:01:12 +0200
committerfxqnlr <[email protected]>2023-05-29 18:01:12 +0200
commitc7ecf3019a75dc0ab1a0aefeb9b880899fc8a231 (patch)
tree116075aaa57c35afca2749719d450c3cb473ab3e /src/main.rs
parent7755c9acf6b8a1d81c03ef1138e80a162f36e743 (diff)
downloadmodlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.tar
modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.tar.gz
modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.zip
cargo fmt and add fmt file
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index d9ad6af..5d60a17 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,8 +2,9 @@ use clap::{Parser, Subcommand};
2use modlist::{ 2use modlist::{
3 config::Cfg, 3 config::Cfg,
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, export, get_current_list, import, list_add, list_change, list_list, list_remove, 5 download, export, get_current_list, import, list_add, list_change,
6 list_version, mod_add, mod_remove, update, AddMod, IDSelector, List, Modloader, VersionLevel, 6 list_list, list_remove, list_version, mod_add, mod_remove, update, AddMod,
7 IDSelector, List, Modloader, VersionLevel,
7}; 8};
8 9
9#[derive(Parser)] 10#[derive(Parser)]
@@ -170,7 +171,11 @@ async fn main() {
170 } => { 171 } => {
171 let listf = match list { 172 let listf = match list {
172 Some(list) => lists_get(&config, &list).unwrap(), 173 Some(list) => lists_get(&config, &list).unwrap(),
173 None => lists_get(&config, &config_get_current_list(&config).unwrap()).unwrap(), 174 None => lists_get(
175 &config,
176 &config_get_current_list(&config).unwrap(),
177 )
178 .unwrap(),
174 }; 179 };
175 180
176 let marked_id = match version { 181 let marked_id = match version {
@@ -188,7 +193,11 @@ async fn main() {
188 ModCommands::Remove { id, list } => { 193 ModCommands::Remove { id, list } => {
189 let listf = match list { 194 let listf = match list {
190 Some(list) => lists_get(&config, &list).unwrap(), 195 Some(list) => lists_get(&config, &list).unwrap(),
191 None => lists_get(&config, &config_get_current_list(&config).unwrap()).unwrap(), 196 None => lists_get(
197 &config,
198 &config_get_current_list(&config).unwrap(),
199 )
200 .unwrap(),
192 }; 201 };
193 mod_remove(&config, &id, &listf) 202 mod_remove(&config, &id, &listf)
194 } 203 }