aboutsummaryrefslogtreecommitdiffhomepage
path: root/libs/hbb_common/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hbb_common/src/config.rs')
-rw-r--r--libs/hbb_common/src/config.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs
index 3bfc885..099a454 100644
--- a/libs/hbb_common/src/config.rs
+++ b/libs/hbb_common/src/config.rs
@@ -337,14 +337,13 @@ impl Config2 {
pub fn load_path<T: serde::Serialize + serde::de::DeserializeOwned + Default + std::fmt::Debug>(
file: PathBuf,
) -> T {
- let cfg = match confy::load_path(file) {
+ match confy::load_path(file) {
Ok(config) => config,
Err(err) => {
log::error!("Failed to load config: {}", err);
T::default()
}
- };
- cfg
+ }
}
#[inline]