mirror of
https://codeberg.org/icewind/php-literal-parser.git
synced 2026-06-03 10:34:08 +02:00
fix tests
This commit is contained in:
parent
d185883573
commit
bd3f415eae
3 changed files with 34 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue