@@ -16,9 +16,9 @@ use core::slice::raw;
16
16
17
17
use { Rng , SeedableRng , Rand } ;
18
18
19
- static RAND_SIZE_LEN : u32 = 8 ;
20
- static RAND_SIZE : u32 = 1 << ( RAND_SIZE_LEN as uint ) ;
21
- static RAND_SIZE_UINT : uint = 1 << ( RAND_SIZE_LEN as uint ) ;
19
+ const RAND_SIZE_LEN : u32 = 8 ;
20
+ const RAND_SIZE : u32 = 1 << ( RAND_SIZE_LEN as uint ) ;
21
+ const RAND_SIZE_UINT : uint = 1 << ( RAND_SIZE_LEN as uint ) ;
22
22
23
23
/// A random number generator that uses the ISAAC algorithm[1].
24
24
///
@@ -251,8 +251,8 @@ impl Rand for IsaacRng {
251
251
}
252
252
}
253
253
254
- static RAND_SIZE_64_LEN : uint = 8 ;
255
- static RAND_SIZE_64 : uint = 1 << RAND_SIZE_64_LEN ;
254
+ const RAND_SIZE_64_LEN : uint = 8 ;
255
+ const RAND_SIZE_64 : uint = 1 << RAND_SIZE_64_LEN ;
256
256
257
257
/// A random number generator that uses ISAAC-64[1], the 64-bit
258
258
/// variant of the ISAAC algorithm.
@@ -356,8 +356,8 @@ impl Isaac64Rng {
356
356
// abbreviations
357
357
let mut a = self . a ;
358
358
let mut b = self . b + self . c ;
359
- static MIDPOINT : uint = RAND_SIZE_64 / 2 ;
360
- static MP_VEC : [ ( uint , uint ) , .. 2 ] = [ ( 0 , MIDPOINT ) , ( MIDPOINT , 0 ) ] ;
359
+ const MIDPOINT : uint = RAND_SIZE_64 / 2 ;
360
+ const MP_VEC : [ ( uint , uint ) , .. 2 ] = [ ( 0 , MIDPOINT ) , ( MIDPOINT , 0 ) ] ;
361
361
macro_rules! ind (
362
362
( $x: expr) => {
363
363
* self . mem. unsafe_get( ( $x as uint >> 3 ) & ( RAND_SIZE_64 - 1 ) )
0 commit comments