From 3a1b37d6f26a8b81caf135513f41a60bd9610372 Mon Sep 17 00:00:00 2001 From: debris Date: Tue, 19 Jan 2016 12:20:44 +0100 Subject: [PATCH] removed overflowing_shr --- util/src/uint.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/util/src/uint.rs b/util/src/uint.rs index 60493688c..c1cb38fd2 100644 --- a/util/src/uint.rs +++ b/util/src/uint.rs @@ -111,8 +111,6 @@ pub trait Uint: Sized + Default + FromStr + From + FromJson + fmt::Debug + fn overflowing_neg(self) -> (Self, bool); fn overflowing_shl(self, shift: u32) -> (Self, bool); - - fn overflowing_shr(self, shift: u32) -> (Self, bool); } macro_rules! construct_uint { @@ -367,12 +365,6 @@ macro_rules! construct_uint { } ($name(ret), overflow) } - - fn overflowing_shr(self, _shift32: u32) -> ($name, bool) { - // TODO [todr] not used for now - unimplemented!(); - } - } impl $name { @@ -1311,28 +1303,6 @@ mod tests { ); } - #[ignore] - #[test] - pub fn uint256_shr_overflow() { - assert_eq!( - U256::from_str("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap() - .overflowing_shr(4), - (U256::from_str("0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap(), true) - ); - } - - #[ignore] - #[test] - pub fn uint256_shr_overflow2() { - assert_eq!( - U256::from_str("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0").unwrap() - .overflowing_shr(4), - (U256::from_str("0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap(), false) - ); - } - - - #[test] pub fn uint256_mul() { assert_eq!(