From 3beb4b1a6c1e8169ee970c9853b9b7936bf36fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Tue, 22 Dec 2015 14:10:17 +0100 Subject: [PATCH] variable `CPUS_SIZE` should have a snake case name such as `cpus_size` --- src/libtest/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 1b32658a790..2945d20ceb1 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -923,13 +923,13 @@ fn get_concurrency() -> usize { target_os = "netbsd"))] fn num_cpus() -> usize { let mut cpus: libc::c_uint = 0; - let mut CPUS_SIZE = std::mem::size_of_val(&cpus); + let mut cpus_size = std::mem::size_of_val(&cpus); let mut mib = [libc::CTL_HW, libc::HW_AVAILCPU, 0, 0]; unsafe { libc::sysctl(mib.as_mut_ptr(), 2, &mut cpus as *mut _ as *mut _, - &mut CPUS_SIZE as *mut _ as *mut _, + &mut cpus_size as *mut _ as *mut _, 0 as *mut _, 0); } if cpus < 1 { @@ -937,7 +937,7 @@ fn get_concurrency() -> usize { unsafe { libc::sysctl(mib.as_mut_ptr(), 2, &mut cpus as *mut _ as *mut _, - &mut CPUS_SIZE as *mut _ as *mut _, + &mut cpus_size as *mut _ as *mut _, 0 as *mut _, 0); } if cpus < 1 {