diff options
author | Nadrieril | 2019-08-12 23:24:48 +0200 |
---|---|---|
committer | Nadrieril | 2019-08-13 14:24:56 +0200 |
commit | 52f9ecfc4dac65d305fd920e8c7f748889a0804f (patch) | |
tree | 106a54c066d1a38e99a73644f0b8f20df280b7e7 /dhall/src/error | |
parent | 7d17d39005531cb77d8eaf32ed7de8938c66f874 (diff) |
Move api into its own crate
Diffstat (limited to '')
-rw-r--r-- | dhall/src/error/mod.rs | 10 |
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()) + } +} + |