Skip to content

Commit 56c171f

Browse files
committed
Workaround to support older Rustc
1 parent 6688100 commit 56c171f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rand_core/src/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ where <R as BlockRngCore>::Results: AsRef<[u32]> + AsMut<[u32]>
187187
let read_u64 = |results: &[u32], index| {
188188
if cfg!(any(target_endian = "little")) {
189189
// requires little-endian CPU
190-
let ptr: *const u64 = results[index..=index+1].as_ptr() as *const u64;
190+
let ptr: *const u64 = results[index..index+2].as_ptr() as *const u64;
191191
unsafe { ptr::read_unaligned(ptr) }
192192
} else {
193193
let x = u64::from(results[index]);

0 commit comments

Comments
 (0)