diff options
Diffstat (limited to 'chewed/src/error.rs')
-rw-r--r-- | chewed/src/error.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chewed/src/error.rs b/chewed/src/error.rs index cb2cc4b..420a376 100644 --- a/chewed/src/error.rs +++ b/chewed/src/error.rs @@ -11,7 +11,7 @@ impl fmt::Display for TakeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::BadBranch(got, expected) => { - write!(f, "Unexpected character {:?}.", got)?; + write!(f, "Unexpected character {:?}. ", got)?; if expected.is_empty() { write!(f, "Expected end of input.") @@ -51,6 +51,8 @@ impl fmt::Display for ParseError { } } +impl Error for ParseError {} + impl From<TakeError> for ParseError { fn from(e: TakeError) -> Self { Self::TakeError(e) |