Skip to content

Commit 396e02a

Browse files
committed
Remove two unecessary usize casts
1 parent 9cea23c commit 396e02a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/isaac.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl Rand for IsaacRng {
246246
unsafe {
247247
let ptr = ret.rsl.as_mut_ptr() as *mut u8;
248248

249-
let slice = slice::from_raw_mut_buf(&ptr, (RAND_SIZE * 4) as usize);
249+
let slice = slice::from_raw_mut_buf(&ptr, RAND_SIZE_USIZE * 4);
250250
other.fill_bytes(slice);
251251
}
252252
ret.cnt = 0;
@@ -489,7 +489,7 @@ impl Rand for Isaac64Rng {
489489
unsafe {
490490
let ptr = ret.rsl.as_mut_ptr() as *mut u8;
491491

492-
let slice = slice::from_raw_mut_buf(&ptr, (RAND_SIZE_64 * 8) as usize);
492+
let slice = slice::from_raw_mut_buf(&ptr, RAND_SIZE_64 * 8);
493493
other.fill_bytes(slice);
494494
}
495495
ret.cnt = 0;

0 commit comments

Comments
 (0)