fix: error wrap
This commit is contained in:
1 parent
b01b3f519f
commit
2c0b0460c9
1 file changed
+2
-9
+2
-9
@@ -21,15 +21,8 @@ impl DioxusConfig {
|
|||||||
let mut meta_str = String::new();
|
let mut meta_str = String::new();
|
||||||
dioxus_conf_file.read_to_string(&mut meta_str)?;
|
dioxus_conf_file.read_to_string(&mut meta_str)?;
|
||||||
|
|
||||||
match toml::from_str::<DioxusConfig>(&meta_str) {
|
toml::from_str::<DioxusConfig>(&meta_str)
|
||||||
Ok(v) => Ok(v),
|
.map_err(|_| crate::Error::Unique("Dioxus.toml parse failed".into()))
|
||||||
Err(e) => {
|
|
||||||
log::error!("{}", e);
|
|
||||||
Err(crate::error::Error::Unique(
|
|
||||||
"Dioxus.toml parse failed".into(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user