]> git.lizzy.rs Git - mt_ser.git/commitdiff
Add Other variant to errors
authorLizzy Fleckenstein <eliasfleckenstein@web.de>
Mon, 13 Feb 2023 17:04:11 +0000 (18:04 +0100)
committerLizzy Fleckenstein <eliasfleckenstein@web.de>
Mon, 13 Feb 2023 17:04:11 +0000 (18:04 +0100)
src/lib.rs

index 3a84f78145a21e28875637462346fcf0f0c86508..2aa5c5ad5d07131b107a0b56cd6fdac96e0572ee 100644 (file)
@@ -28,6 +28,8 @@ pub enum SerializeError {
     IoError(#[from] io::Error),
     #[error("collection too big: {0}")]
     TooBig(#[from] TryFromIntError),
+    #[error("{0}")]
+    Other(String),
 }
 
 impl From<Infallible> for SerializeError {
@@ -50,6 +52,8 @@ pub enum DeserializeError {
     InvalidEnumVariant(&'static str, u64),
     #[error("invalid constant - wanted: {0:?} - got: {1:?}")]
     InvalidConst(Box<dyn Debug>, Box<dyn Debug>),
+    #[error("{0}")]
+    Other(String),
 }
 
 impl From<Infallible> for DeserializeError {