Skip to content

Commit

Permalink
style: 💄 Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pvshvp-oss committed Mar 8, 2024
1 parent 0f0c20d commit 4c1df6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions paxy/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use serde::{Deserialize, Serialize};
use std::{
fs::{self, create_dir_all, File}, io::Write, path::PathBuf
fs::{self, create_dir_all, File},
io::Write,
path::PathBuf,
};
use url::Url;

Expand Down Expand Up @@ -43,7 +45,8 @@ impl Default for Config {
}
if !user.is_file() {
let mut file = File::create(user).unwrap();
file.write_all(toml::to_string(&conf).unwrap().as_bytes()).expect("Permission error");
file.write_all(toml::to_string(&conf).unwrap().as_bytes())
.expect("Permission error");
}
}
conf
Expand All @@ -67,6 +70,6 @@ fn load_conf() -> Config {
conf_path.push("config.ini");
match toml::from_str::<Config>(fs::read_to_string(&conf_path).unwrap().as_str()) {
Ok(val) => val,
Err(_) => Config::default()
Err(_) => Config::default(),
}
}
1 change: 1 addition & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 4c1df6c

Please sign in to comment.