Changed settings format file from JSON to Toml.
This commit is contained in:
+3
-5
@@ -26,12 +26,10 @@ impl Settings {
|
||||
Ok(mut file) => {
|
||||
let mut text = String::new();
|
||||
file.read_to_string(&mut text).unwrap();
|
||||
let loaded = serde_json::from_str(&text);
|
||||
return if loaded.is_ok() {
|
||||
Some(loaded.unwrap())
|
||||
} else {
|
||||
None
|
||||
if let Ok(settings) = toml::from_str(&text) {
|
||||
return Some(settings);
|
||||
}
|
||||
None
|
||||
},
|
||||
Err(..) => None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user