summaryrefslogtreecommitdiff
path: root/dhall/src/error/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/error/mod.rs')
-rw-r--r--dhall/src/error/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs
index 3c00017..ecf3510 100644
--- a/dhall/src/error/mod.rs
+++ b/dhall/src/error/mod.rs
@@ -192,3 +192,13 @@ impl From<TypeError> for Error {
Error::Typecheck(err)
}
}
+
+impl serde::de::Error for Error {
+ fn custom<T>(msg: T) -> Self
+ where
+ T: std::fmt::Display,
+ {
+ Error::Deserialize(msg.to_string())
+ }
+}
+