aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-05-14 19:51:17 +0200
committerHampusM <hampus@hampusmat.com>2023-05-14 19:51:17 +0200
commitad142e9e749adf64642168c0d221b0cf47f149c7 (patch)
tree642308f9aec6032115c62bb6ae269fa37c3fc453 /src/util.rs
parent4d46e44801d8ef40c8a2f4dea1d2c9088f2557a1 (diff)
refactor: use xml-stinksHEADmaster
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs15
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;