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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue