mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Fix ssz_static deserialization
This commit is contained in:
@@ -28,9 +28,11 @@ impl TestDecode for SszStatic {
|
|||||||
|
|
||||||
impl SszStatic {
|
impl SszStatic {
|
||||||
fn value<T: serde::de::DeserializeOwned>(&self) -> Result<T, Error> {
|
fn value<T: serde::de::DeserializeOwned>(&self) -> Result<T, Error> {
|
||||||
serde_yaml::from_str(&self.raw_yaml.as_str()).map_err(|e| {
|
let wrapper: Value<T> = serde_yaml::from_str(&self.raw_yaml.as_str()).map_err(|e| {
|
||||||
Error::FailedToParseTest(format!("Unable to parse {} YAML: {:?}", self.type_name, e))
|
Error::FailedToParseTest(format!("Unable to parse {} YAML: {:?}", self.type_name, e))
|
||||||
})
|
})?;
|
||||||
|
|
||||||
|
Ok(wrapper.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user