diff options
author | Kyohei Uto <im@kyoheiu.dev> | 2023-11-09 06:08:22 +0900 |
---|---|---|
committer | Kyohei Uto <im@kyoheiu.dev> | 2023-11-09 06:08:22 +0900 |
commit | 1fd1359fcc6cfb510735a8fa85fad0c66d886f8c (patch) | |
tree | 5b89bec75ebdf9b30436d022b26531fedaa84909 | |
parent | 4ef24e0a54b97fce76b6ada710f2275e852221fe (diff) |
Merge read_config and read_config_from_str
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/config.rs b/src/config.rs index 1335b3e..de8e6d7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -117,11 +117,7 @@ impl Default for Config { fn read_config(p: &Path) -> Result<Config, FxError> { let s = read_to_string(p)?; - read_config_from_str(&s) -} - -fn read_config_from_str(s: &str) -> Result<Config, FxError> { - let deserialized: Config = serde_yaml::from_str(s)?; + let deserialized: Config = serde_yaml::from_str(&s)?; Ok(deserialized) } |