From e0ccde1ce3f71fe4b5bcfba03676a8bd285d3c23 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 5 Mar 2019 17:37:09 +1100 Subject: [PATCH] Remove unused function from @agemanning --- eth2/types/src/slot_epoch_macros.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/eth2/types/src/slot_epoch_macros.rs b/eth2/types/src/slot_epoch_macros.rs index b0550f2f8..2148b6cc2 100644 --- a/eth2/types/src/slot_epoch_macros.rs +++ b/eth2/types/src/slot_epoch_macros.rs @@ -20,25 +20,6 @@ macro_rules! impl_from_into_u64 { }; } -// need to truncate for some fork-choice algorithms -macro_rules! impl_into_u32 { - ($main: ident) => { - impl Into for $main { - fn into(self) -> u32 { - assert!(self.0 < u64::from(std::u32::MAX), "Lossy conversion to u32"); - self.0 as u32 - } - } - - impl $main { - pub fn as_u32(&self) -> u32 { - assert!(self.0 < u64::from(std::u32::MAX), "Lossy conversion to u32"); - self.0 as u32 - } - } - }; -} - macro_rules! impl_from_into_usize { ($main: ident) => { impl From for $main {