From 60cad45d76fa8c429dd0540b4353b75754415ded Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 5 Jan 2016 22:46:29 +0100 Subject: [PATCH] Add explicit cast to help Rustc to resolve the types --- src/isaac.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/isaac.rs b/src/isaac.rs index 1b271b52419..42de3523fb0 100644 --- a/src/isaac.rs +++ b/src/isaac.rs @@ -131,7 +131,7 @@ impl IsaacRng { const MIDPOINT: usize = RAND_SIZE_USIZE / 2; macro_rules! ind { - ($x:expr) => ( self.mem[($x >> 2).0 as usize & (RAND_SIZE_USIZE - 1)] ) + ($x:expr) => ( self.mem[($x >> 2usize).0 as usize & (RAND_SIZE_USIZE - 1)] ) } let r = [(0, MIDPOINT), (MIDPOINT, 0)]; @@ -370,7 +370,7 @@ impl Isaac64Rng { const MP_VEC: [(usize, usize); 2] = [(0,MIDPOINT), (MIDPOINT, 0)]; macro_rules! ind { ($x:expr) => { - *self.mem.get_unchecked((($x >> 3).0 as usize) & (RAND_SIZE_64 - 1)) + *self.mem.get_unchecked((($x >> 3usize).0 as usize) & (RAND_SIZE_64 - 1)) } }