diff --git a/src/lib.rs b/src/lib.rs index 898f667..ffc382a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ mod python; #[macro_use] extern crate quickcheck; -use std::fmt; +use std::{error::Error, fmt}; const ALPHABET: &[u8] = b"ybndrfg8ejkmcpqxot1uwisza345h769"; const INVERSE_ALPHABET: [i8; 123] = [ @@ -20,6 +20,8 @@ const INVERSE_ALPHABET: [i8; 123] = [ #[derive(Debug, PartialEq)] pub struct DecodeError; +impl Error for DecodeError {} + impl fmt::Display for DecodeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "DecodeError: Non-zbase32 digit found")