From b368a18a914a44fd74896b7b1ac7a2530b2bdcb3 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 28 Apr 2022 19:39:03 +0200 Subject: fix macro name --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f182b41..d3f5b4e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,7 @@ trait FromEndian: Sized { fn from_be_bytes>(bytes: B) -> Option; } -macro_rules! impl_endian_read { +macro_rules! impl_from_endian { ($ty: ty) => { impl FromEndian for $ty { fn from_le_bytes>(bytes: B) -> Option { @@ -44,9 +44,9 @@ macro_rules! impl_endian_read { }; } -impl_endian_read!(u16); -impl_endian_read!(u32); -impl_endian_read!(u64); +impl_from_endian!(u16); +impl_from_endian!(u32); +impl_from_endian!(u64); #[derive(Debug, Clone, Copy)] enum Endian { -- cgit v1.2.3