reorganze a bit

This commit is contained in:
askiiart 2025-05-15 23:21:40 -05:00
parent 3f622cda5b
commit 3fced5e6a8
Signed by untrusted user who does not match committer: askiiart
GPG key ID: 6A32977DAF31746A

View file

@ -19,8 +19,16 @@ fn main() {
exit(0);
}
println!("Config path: {}", config_path.to_str().unwrap());
match run(config_path) {
Ok(_) => {}
Err(e) => {
println!("{}", e);
exit(1);
}
}
}
fn run(config_path: PathBuf) -> Result<(), Error> {
let config: Config;
match get_config_from_path(config_path) {
@ -28,11 +36,13 @@ fn main() {
config = conf;
}
Err(e) => {
panic!("{}", e);
return Err(e);
}
}
println!("{:?}", config);
return Ok(());
}
fn get_config_from_path(path: PathBuf) -> Result<Config, Error> {