Remove Result from Config loading

This commit is contained in:
Neshura 2023-12-29 22:35:16 +01:00
parent b8a5ca2b95
commit a66180d817
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -13,7 +13,7 @@ pub(crate) struct 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") {
Ok(data) => data,
Err(e) => panic!("config.toml not found: {e}"),
@ -36,7 +36,7 @@ impl Config {
panic!("'Description' type Post Body only supported for Volumes!")
}
});
Ok(cfg)
cfg
}
}