diff options
author | fxqnlr <[email protected]> | 2023-05-29 18:01:12 +0200 |
---|---|---|
committer | fxqnlr <[email protected]> | 2023-05-29 18:01:12 +0200 |
commit | c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231 (patch) | |
tree | 116075aaa57c35afca2749719d450c3cb473ab3e /src/config.rs | |
parent | 7755c9acf6b8a1d81c03ef1138e80a162f36e743 (diff) | |
download | modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.tar modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.tar.gz modlist-c7ecf3019a75dc0ab1a0aefeb9b880899fc8a231.zip |
cargo fmt and add fmt file
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index 3858484..f0eb8f7 100644 --- a/src/config.rs +++ b/src/config.rs | |||
@@ -7,7 +7,9 @@ use std::{ | |||
7 | use indicatif::{ProgressBar, ProgressStyle}; | 7 | use indicatif::{ProgressBar, ProgressStyle}; |
8 | use serde::{Deserialize, Serialize}; | 8 | use serde::{Deserialize, Serialize}; |
9 | 9 | ||
10 | use crate::{check_game_versions, db::db_setup, error::MLE, Modloader, VersionLevel}; | 10 | use crate::{ |
11 | check_game_versions, db::db_setup, error::MLE, Modloader, VersionLevel, | ||
12 | }; | ||
11 | 13 | ||
12 | #[derive(Debug, Clone, Serialize, Deserialize)] | 14 | #[derive(Debug, Clone, Serialize, Deserialize)] |
13 | pub struct Cfg { | 15 | pub struct Cfg { |
@@ -44,7 +46,8 @@ impl Cfg { | |||
44 | let mut file = match File::open(&configfile) { | 46 | let mut file = match File::open(&configfile) { |
45 | Ok(file) => file, | 47 | Ok(file) => file, |
46 | Err(err) => { | 48 | Err(err) => { |
47 | if err.kind() == std::io::ErrorKind::NotFound && path.is_none() { | 49 | if err.kind() == std::io::ErrorKind::NotFound && path.is_none() |
50 | { | ||
48 | create_config(&configfile)?; | 51 | create_config(&configfile)?; |
49 | File::open(&configfile)? | 52 | File::open(&configfile)? |
50 | } else { | 53 | } else { |