summaryrefslogtreecommitdiff
path: root/dhall/src/error/mod.rs
diff options
context:
space:
mode:
authorNadrieril2020-06-25 12:46:02 +0100
committerGitHub2020-06-25 12:46:02 +0100
commitb6efa8dd926cf2d136e3040987d81cdd1934a0fa (patch)
tree65b6cc777daa0f6d9aa2f5fd0334c5bb1c2106c6 /dhall/src/error/mod.rs
parent3d9c0b12c6b34185e556071ee16401691bfd8e49 (diff)
parent73efcaada6032640da6caaed266cd6457a5f6966 (diff)
Merge pull request #170 from Nadrieril/custom-harness
Diffstat (limited to 'dhall/src/error/mod.rs')
-rw-r--r--dhall/src/error/mod.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs
index 0cfa93c..d533264 100644
--- a/dhall/src/error/mod.rs
+++ b/dhall/src/error/mod.rs
@@ -92,6 +92,17 @@ impl std::fmt::Display for TypeError {
impl std::error::Error for TypeError {}
+impl std::fmt::Display for EncodeError {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ let msg = match self {
+ EncodeError::CBORError(e) => format!("Encode error: {}", e),
+ };
+ write!(f, "{}", msg)
+ }
+}
+
+impl std::error::Error for EncodeError {}
+
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match &self.kind {