mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-21 09:31:19 +02:00
style: fmt & clippy processed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::fs::read_to_string;
|
||||
use serde::Deserialize;
|
||||
use std::fs::read_to_string;
|
||||
|
||||
/// General configuration Struct
|
||||
#[derive(Debug, Deserialize)]
|
||||
@@ -35,14 +35,11 @@ pub struct ScootalooConfig {
|
||||
|
||||
/// Parses the TOML file into a Config Struct
|
||||
pub fn parse_toml(toml_file: &str) -> Config {
|
||||
let toml_config = read_to_string(toml_file).unwrap_or_else(|e|
|
||||
panic!("Cannot open config file {}: {}", toml_file, e)
|
||||
);
|
||||
let toml_config = read_to_string(toml_file)
|
||||
.unwrap_or_else(|e| panic!("Cannot open config file {}: {}", toml_file, e));
|
||||
|
||||
let config: Config = toml::from_str(&toml_config).unwrap_or_else(|e|
|
||||
panic!("Cannot parse TOML file {}: {}", toml_file, e)
|
||||
);
|
||||
let config: Config = toml::from_str(&toml_config)
|
||||
.unwrap_or_else(|e| panic!("Cannot parse TOML file {}: {}", toml_file, e));
|
||||
|
||||
config
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user