@@ -361,7 +361,7 @@ impl Isaac64Rng {
361
361
const MP_VEC : [ ( uint , uint ) , .. 2 ] = [ ( 0 , MIDPOINT ) , ( MIDPOINT , 0 ) ] ;
362
362
macro_rules! ind (
363
363
( $x: expr) => {
364
- * self . mem. unsafe_get ( ( $x as uint >> 3 ) & ( RAND_SIZE_64 - 1 ) )
364
+ * self . mem. get_unchecked ( ( $x as uint >> 3 ) & ( RAND_SIZE_64 - 1 ) )
365
365
}
366
366
) ;
367
367
@@ -375,13 +375,13 @@ impl Isaac64Rng {
375
375
let mix = if $j == 0 { !mix} else { mix} ;
376
376
377
377
unsafe {
378
- let x = * self . mem. unsafe_get ( base + mr_offset) ;
379
- a = mix + * self . mem. unsafe_get ( base + m2_offset) ;
378
+ let x = * self . mem. get_unchecked ( base + mr_offset) ;
379
+ a = mix + * self . mem. get_unchecked ( base + m2_offset) ;
380
380
let y = ind!( x) + a + b;
381
- * self . mem. unsafe_mut ( base + mr_offset) = y;
381
+ * self . mem. get_unchecked_mut ( base + mr_offset) = y;
382
382
383
383
b = ind!( y >> RAND_SIZE_64_LEN ) + x;
384
- * self . rsl. unsafe_mut ( base + mr_offset) = b;
384
+ * self . rsl. get_unchecked_mut ( base + mr_offset) = b;
385
385
}
386
386
} }
387
387
) ;
@@ -392,13 +392,13 @@ impl Isaac64Rng {
392
392
let mix = if $j == 0 { !mix} else { mix} ;
393
393
394
394
unsafe {
395
- let x = * self . mem. unsafe_get ( base + mr_offset) ;
396
- a = mix + * self . mem. unsafe_get ( base + m2_offset) ;
395
+ let x = * self . mem. get_unchecked ( base + mr_offset) ;
396
+ a = mix + * self . mem. get_unchecked ( base + m2_offset) ;
397
397
let y = ind!( x) + a + b;
398
- * self . mem. unsafe_mut ( base + mr_offset) = y;
398
+ * self . mem. get_unchecked_mut ( base + mr_offset) = y;
399
399
400
400
b = ind!( y >> RAND_SIZE_64_LEN ) + x;
401
- * self . rsl. unsafe_mut ( base + mr_offset) = b;
401
+ * self . rsl. get_unchecked_mut ( base + mr_offset) = b;
402
402
}
403
403
} }
404
404
) ;
0 commit comments