From 851f41b686843cf1758e21cd90162be6ab73c6d1 Mon Sep 17 00:00:00 2001 From: Ronno Das Date: Wed, 5 Feb 2025 11:06:47 +0100 Subject: [PATCH] Add `Error` impls for error types --- src/lib.rs | 2 ++ src/raw.rs | 2 ++ src/types/mod.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fbb1a6c..88c2786 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,6 +88,8 @@ impl Display for RetrievalError { } } +impl std::error::Error for RetrievalError {} + impl From for RetrievalError { fn from(err: TypeError) -> Self { Self::TypeError(err) diff --git a/src/raw.rs b/src/raw.rs index 38a8bb2..cbbd87f 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -75,6 +75,8 @@ impl fmt::Display for ParseError { } } +impl std::error::Error for ParseError {} + /// Error conditions that might occur during initial parsing of the /// bibliography. /// diff --git a/src/types/mod.rs b/src/types/mod.rs index fab150b..ee232f4 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -43,6 +43,8 @@ impl fmt::Display for TypeError { } } +impl std::error::Error for TypeError {} + /// Error conditions that might occur while parsing the chunks in a field into a specific /// [`Type`]. ///