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; use settings::Settings;
fn main() { fn main() {
let settings = Settings::new(); let settings = Settings::new()
let settings = match settings { .expect("Could not read settings.");
Ok(s) => s,
Err(_) => {
println!("Could not read settings. Please provide the settings file 'clrigctl.toml'.");
return;
}
};
println!("{:?}", settings); println!("{:?}", settings);
} }