Skip to content

Commit

Permalink
Make error printing work even if ValT demands Debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Apr 19, 2024
1 parent 19a0135 commit 1699a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaq-interpret/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ impl<V: ValT> fmt::Display for Error<V> {
match self {
Self::Val(v) => {
if let Some(s) = v.as_str() {
s.fmt(f)
write!(f, "{s}")
} else {
v.fmt(f)
write!(f, "{v}")
}
}
Self::Type(v, ty) => write!(f, "cannot use {v} as {ty}"),
Expand Down

0 comments on commit 1699a7d

Please sign in to comment.