summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2023-04-27 10:08:20 +0200
committerFxQnLr <[email protected]>2023-04-27 10:08:20 +0200
commit4e6466af1329f7b9e341df2e76ab696d11f80c93 (patch)
treeeef58fecfadad90386b38af581abab8cc3d3cfc0 /src/main.rs
parentf1912007484f077b5585a872ca732d087beefa9a (diff)
downloadmodlist-4e6466af1329f7b9e341df2e76ab696d11f80c93.tar
modlist-4e6466af1329f7b9e341df2e76ab696d11f80c93.tar.gz
modlist-4e6466af1329f7b9e341df2e76ab696d11f80c93.zip
version bump, cargo fmt and cargo update
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/main.rs b/src/main.rs
index 30c4001..0ecb850 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,8 +2,8 @@ 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_remove, 5 download, export, get_current_list, import, list_add, list_change, list_remove, list_version,
6 list_version, mod_add, mod_remove, update, IDSelector, List, Modloader, 6 mod_add, mod_remove, update, IDSelector, List, Modloader,
7}; 7};
8 8
9//TODO implement remote sql db 9//TODO implement remote sql db
@@ -14,7 +14,7 @@ use modlist::{
14struct Cli { 14struct Cli {
15 #[command(subcommand)] 15 #[command(subcommand)]
16 command: Commands, 16 command: Commands,
17 17
18 /// config file path 18 /// config file path
19 #[arg(short, long)] 19 #[arg(short, long)]
20 config: Option<String>, 20 config: Option<String>,
@@ -146,7 +146,7 @@ enum ListCommands {
146#[tokio::main] 146#[tokio::main]
147async fn main() { 147async fn main() {
148 let cli = Cli::parse(); 148 let cli = Cli::parse();
149 149
150 let config = Cfg::init(cli.config).unwrap(); 150 let config = Cfg::init(cli.config).unwrap();
151 println!("{:?}", config); 151 println!("{:?}", config);
152 152
@@ -253,14 +253,12 @@ async fn main() {
253 Commands::Import { file, download } => { 253 Commands::Import { file, download } => {
254 let filestr: String = match file { 254 let filestr: String = match file {
255 Some(args) => args, 255 Some(args) => args,
256 None => 256 None => dirs::home_dir()
257 dirs::home_dir() 257 .unwrap()
258 .unwrap() 258 .join("mlexport.toml")
259 .join("mlexport.toml") 259 .into_os_string()
260 .into_os_string() 260 .into_string()
261 .into_string() 261 .unwrap(),
262 .unwrap()
263 ,
264 }; 262 };
265 263
266 import(config, filestr, download).await 264 import(config, filestr, download).await