From 3bfad6d980f3beeebb59bfc97aacfcb64845f641 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Wed, 1 May 2024 06:04:17 +0200 Subject: [PATCH] Add serdey.rs from Fiono11-simplpedpop --- src/serdey.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/serdey.rs b/src/serdey.rs index 7b31ed3..8a8e2f5 100644 --- a/src/serdey.rs +++ b/src/serdey.rs @@ -13,15 +13,15 @@ #[cfg(feature = "serde")] #[rustfmt::skip] macro_rules! serde_boilerplate { ($t:ty) => { -impl serde_crate::Serialize for $t { - fn serialize(&self, serializer: S) -> Result where S: serde_crate::Serializer { +impl serde::Serialize for $t { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { let bytes = &self.to_bytes()[..]; serde_bytes::Bytes::new(bytes).serialize(serializer) } } -impl<'d> serde_crate::Deserialize<'d> for $t { - fn deserialize(deserializer: D) -> Result where D: serde_crate::Deserializer<'d> { +impl<'d> serde::Deserialize<'d> for $t { + fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'d> { cfg_if::cfg_if!{ if #[cfg(feature = "std")] { let bytes = >::deserialize(deserializer)?;