Skip to content

Commit e916676

Browse files
committed
Rollup merge of #30431 - mmcco:cleanup, r=alexcrichton
Remove a needless variable and simply a cfg().
2 parents 9e953df + ccb2186 commit e916676

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libstd/rand/os.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mod imp {
4242
const NR_GETRANDOM: libc::c_long = 355;
4343
#[cfg(any(target_arch = "arm", target_arch = "powerpc"))]
4444
const NR_GETRANDOM: libc::c_long = 384;
45-
#[cfg(any(target_arch = "aarch64"))]
45+
#[cfg(target_arch = "aarch64")]
4646
const NR_GETRANDOM: libc::c_long = 278;
4747

4848
unsafe {
@@ -60,8 +60,7 @@ mod imp {
6060

6161
fn getrandom_fill_bytes(v: &mut [u8]) {
6262
let mut read = 0;
63-
let len = v.len();
64-
while read < len {
63+
while read < v.len() {
6564
let result = getrandom(&mut v[read..]);
6665
if result == -1 {
6766
let err = errno() as libc::c_int;

0 commit comments

Comments
 (0)