Remove Result from Config loading
This commit is contained in:
parent
b8a5ca2b95
commit
a66180d817
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ pub(crate) struct Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
pub(crate) fn load() -> Result<Self, String> {
|
pub(crate) fn load() -> Self {
|
||||||
let cfg: Self = match confy::load(env!("CARGO_PKG_NAME"), "config") {
|
let cfg: Self = match confy::load(env!("CARGO_PKG_NAME"), "config") {
|
||||||
Ok(data) => data,
|
Ok(data) => data,
|
||||||
Err(e) => panic!("config.toml not found: {e}"),
|
Err(e) => panic!("config.toml not found: {e}"),
|
||||||
|
@ -36,7 +36,7 @@ impl Config {
|
||||||
panic!("'Description' type Post Body only supported for Volumes!")
|
panic!("'Description' type Post Body only supported for Volumes!")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Ok(cfg)
|
cfg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue