simplify error handling
This commit is contained in:
parent
dbaa477947
commit
a33109f062
1 changed files with 2 additions and 8 deletions
10
src/main.rs
10
src/main.rs
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue