From 43a37c5bbc69f5f6295b0023fac538edc2e19968 Mon Sep 17 00:00:00 2001 From: n01e0 Date: Sat, 30 Dec 2023 02:53:20 +0900 Subject: [PATCH] remove unwrap --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/config.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 069ddf7..dcc5f7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -974,7 +974,7 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppb" -version = "0.2.2" +version = "0.2.3" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 0dfdf67..27a76f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ppb" -version = "0.2.2" +version = "0.2.3" edition = "2021" authors = ["n01e0 "] license = "MIT" diff --git a/src/config.rs b/src/config.rs index eddc835..e90f2dc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -81,8 +81,8 @@ impl Config { pub fn new(args: &Args) -> Result { match args.config { Some(ref config_file) => { - let config_file = std::fs::read_to_string(config_file).unwrap(); - let config_file: ConfigFile = serde_yaml::from_str(&config_file).unwrap(); + let config_file = std::fs::read_to_string(config_file)?; + let config_file: ConfigFile = serde_yaml::from_str(&config_file)?; Ok(Config { organization: config_file .organization