Implement std::fmt::Display for eval::Error

This commit is contained in:
cdo committed 2026-09-26 13:24:58 +01:00
1 parent fab8c7c3a8
commit 45455d3a02
1 file changed
+8
+8
View File
@@ -21,3 +21,11 @@ pub trait Evaluator {
fn eval(&mut self, input: Self::Expr) -> Result<Self::Expr, Self::Error>; fn eval(&mut self, input: Self::Expr) -> Result<Self::Expr, Self::Error>;
} }
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", match self {
Error::UnsupportedExpression => "Unsupported expression",
})
}
}