From eebe7b1939c110f6d766ca9844c4c6c81fd327e5 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Mon, 13 Feb 2023 18:04:11 +0100 Subject: [PATCH] Add Other variant to errors --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 3a84f78..2aa5c5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 for SerializeError { @@ -50,6 +52,8 @@ pub enum DeserializeError { InvalidEnumVariant(&'static str, u64), #[error("invalid constant - wanted: {0:?} - got: {1:?}")] InvalidConst(Box, Box), + #[error("{0}")] + Other(String), } impl From for DeserializeError { -- 2.44.0