diff options
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs new file mode 100644 index 0000000..fd1f767 --- /dev/null +++ b/src/util.rs @@ -0,0 +1,15 @@ +macro_rules! impl_from_deserializer_err_wrapped { + ($err: ident) => { + impl From<::xml_stinks::deserializer::Error<::std::convert::Infallible>> for $err + { + fn from( + err: ::xml_stinks::deserializer::Error<::std::convert::Infallible>, + ) -> Self + { + Self::DeserializationFailed(err.into()) + } + } + }; +} + +pub(crate) use impl_from_deserializer_err_wrapped; |