From ccb218616b1f07724ddf46841ac83882e06bc73d Mon Sep 17 00:00:00 2001 From: Michael McConville Date: Thu, 17 Dec 2015 00:36:31 -0500 Subject: [PATCH] Trivial cleanup Remove a needless variable and simply a cfg(). --- src/libstd/rand/os.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index d1bd013e67b..c4f59d51f5d 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -42,7 +42,7 @@ mod imp { const NR_GETRANDOM: libc::c_long = 355; #[cfg(any(target_arch = "arm", target_arch = "powerpc"))] const NR_GETRANDOM: libc::c_long = 384; - #[cfg(any(target_arch = "aarch64"))] + #[cfg(target_arch = "aarch64")] const NR_GETRANDOM: libc::c_long = 278; unsafe { @@ -60,8 +60,7 @@ mod imp { fn getrandom_fill_bytes(v: &mut [u8]) { let mut read = 0; - let len = v.len(); - while read < len { + while read < v.len() { let result = getrandom(&mut v[read..]); if result == -1 { let err = errno() as libc::c_int;