simplify error handling

This commit is contained in:
Martin Brodbeck 2023-11-29 13:11:26 +01:00
parent dbaa477947
commit a33109f062

View file

@ -3,14 +3,8 @@ mod settings;
use settings::Settings;
fn main() {
let settings = Settings::new();
let settings = match settings {
Ok(s) => s,
Err(_) => {
println!("Could not read settings. Please provide the settings file 'clrigctl.toml'.");
return;
}
};
let settings = Settings::new()
.expect("Could not read settings.");
println!("{:?}", settings);
}