summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-04-17 20:30:16 +0200
committerfxqnlr <[email protected]>2023-04-17 20:30:16 +0200
commit93e61a4bd6ad8b5db1083bdd21994bf73b0b90ba (patch)
tree043adeff1c117f3f0e4fe7bffc472c299e01d642 /src/config.rs
parent77d2ac94534b12300b5b7eff6e28023d815708eb (diff)
downloadmodlist-93e61a4bd6ad8b5db1083bdd21994bf73b0b90ba.tar
modlist-93e61a4bd6ad8b5db1083bdd21994bf73b0b90ba.tar.gz
modlist-93e61a4bd6ad8b5db1083bdd21994bf73b0b90ba.zip
added clap cli, modified (basically) all user interface functions;
changed some functions to easier string handling
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs
index ded0062..075d884 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -27,7 +27,7 @@ impl Cfg {
27 let default_cfg = Cfg { data: String::from("./"), apis: Apis { modrinth: String::from("https://api.modrinth.com/v2/") } }; 27 let default_cfg = Cfg { data: String::from("./"), apis: Apis { modrinth: String::from("https://api.modrinth.com/v2/") } };
28 let mut file = File::create(devdir(configfile.to_str().unwrap()))?; 28 let mut file = File::create(devdir(configfile.to_str().unwrap()))?;
29 println!("Created config file"); 29 println!("Created config file");
30 file.write_all(&toml::to_string(&default_cfg)?.as_bytes())?; 30 file.write_all(toml::to_string(&default_cfg)?.as_bytes())?;
31 File::open(devdir(configfile.to_str().unwrap()))? 31 File::open(devdir(configfile.to_str().unwrap()))?
32 } else { 32 } else {
33 return Err(err.into()); 33 return Err(err.into());