]> git.lizzy.rs Git - mt_ser.git/blobdiff - src/lib.rs
Support string repr
[mt_ser.git] / src / lib.rs
index d5d35d3223145ee1ebc99cd8d0cb790c5a49374a..7a85add8e7717ef10f7953ce79bac0447da68c13 100644 (file)
@@ -48,8 +48,8 @@ pub enum DeserializeError {
     TooBig(#[from] TryFromIntError),
     #[error("invalid UTF-16: {0}")]
     InvalidUtf16(#[from] std::char::DecodeUtf16Error),
-    #[error("invalid {0} enum variant {1}")]
-    InvalidEnumVariant(&'static str, u64),
+    #[error("invalid {0} enum variant {1:?}")]
+    InvalidEnum(&'static str, Box<dyn Debug>),
     #[error("invalid constant - wanted: {0:?} - got: {1:?}")]
     InvalidConst(Box<dyn Debug>, Box<dyn Debug>),
     #[error("{0}")]