fix tests

This commit is contained in:
Robin Appelman 2021-09-09 15:19:31 +02:00
commit bd3f415eae
3 changed files with 34 additions and 6 deletions

View file

@ -292,6 +292,12 @@ impl From<&str> for Value {
}
}
impl From<HashMap<Key, Value>> for Value {
fn from(value: HashMap<Key, Value>) -> Self {
Value::Array(value)
}
}
impl Display for Value {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {

View file

@ -769,9 +769,8 @@ mod tests {
match super::from_str(source) {
Ok(res) => Ok(res),
Err(err) => {
let sourced = err.with_source(source);
eprintln!("{}", sourced);
Err(sourced.into_inner())
eprintln!("{}", err);
Err(err)
}
}
}