Fix SemiparsedVec::from
@@ -12,7 +12,11 @@ pub struct SemiparsedVec<T>(pub Vec<Result<T, (serde_json::Value, serde_json::Er
impl<T: DeserializeOwned> From<Vec<serde_json::Value>> for SemiparsedVec<T> {
fn from(vec: Vec<Value>) -> Self {
- Self(vec.into_iter().map(|val| (val, e)).collect())
+ Self(
+ vec.into_iter()
+ .map(|val| from_value(val.clone()).map_err(|e| (val, e)))
+ .collect(),
+ )
}
}
