mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
resolve anyhow compile errors (#355)
This commit is contained in:
@@ -405,7 +405,9 @@ impl Value {
|
||||
#[cfg(feature = "yaml")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
||||
pub fn from_yaml_str(yaml: &str) -> Result<Value> {
|
||||
Ok(serde_yaml::from_str(yaml)?)
|
||||
let value = serde_yaml::from_str(yaml)
|
||||
.map_err(|err| anyhow::anyhow!("Failed to parse YAML: {}", err))?;
|
||||
Ok(value)
|
||||
}
|
||||
|
||||
/// Deserialize a value from a file containing YAML.
|
||||
|
||||
Reference in New Issue
Block a user