diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs index deb79ee..0972c6a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -9,7 +9,11 @@ use std::result; #[derive(Debug)] pub enum Unexpected { Bool(bool), - Integer(i64), + I8(i8), + I16(i16), + I32(i32), + I64(i64), + I128(i128), Float(f64), Str(String), Unit, @@ -21,7 +25,11 @@ impl fmt::Display for Unexpected { fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> { match *self { Unexpected::Bool(b) => write!(f, "boolean `{}`", b), - Unexpected::Integer(i) => write!(f, "integer `{}`", i), + Unexpected::I8(i) => write!(f, "integer 8 bit `{}`", i), + Unexpected::I16(i) => write!(f, "integer 16 bit `{}`", i), + Unexpected::I32(i) => write!(f, "integer 32 bit `{}`", i), + Unexpected::I64(i) => write!(f, "integer 64 bit `{}`", i), + Unexpected::I128(i) => write!(f, "integer 128 bit `{}`", i), Unexpected::Float(v) => write!(f, "floating point `{}`", v), Unexpected::Str(ref s) => write!(f, "string {:?}", s), Unexpected::Unit => write!(f, "unit value"), |