mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
style(nproc): reformat with rustfmt
This commit is contained in:
parent
b7b347ff03
commit
7b452f3bfe
2 changed files with 11 additions and 14 deletions
|
@ -7,9 +7,9 @@
|
|||
|
||||
// spell-checker:ignore (ToDO) NPROCESSORS nprocs numstr threadstr sysconf
|
||||
|
||||
extern crate clap;
|
||||
extern crate getopts;
|
||||
extern crate num_cpus;
|
||||
extern crate clap;
|
||||
|
||||
#[cfg(unix)]
|
||||
extern crate libc;
|
||||
|
@ -17,8 +17,8 @@ extern crate libc;
|
|||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
use std::env;
|
||||
use clap::{App, Arg};
|
||||
use std::env;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
pub const _SC_NPROCESSORS_CONF: libc::c_int = 83;
|
||||
|
|
|
@ -9,7 +9,6 @@ fn test_nproc() {
|
|||
assert!(nproc > 0);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_nproc_all_omp() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
|
@ -18,7 +17,6 @@ fn test_nproc_all_omp() {
|
|||
let nproc: u8 = result.stdout.trim().parse().unwrap();
|
||||
assert!(nproc > 0);
|
||||
|
||||
|
||||
let result = TestScenario::new(util_name!())
|
||||
.ucmd_keepenv()
|
||||
.env("OMP_NUM_THREADS", "1")
|
||||
|
@ -27,7 +25,6 @@ fn test_nproc_all_omp() {
|
|||
let nproc_omp: u8 = result.stdout.trim().parse().unwrap();
|
||||
assert!(nproc - 1 == nproc_omp);
|
||||
|
||||
|
||||
let result = TestScenario::new(util_name!())
|
||||
.ucmd_keepenv()
|
||||
.env("OMP_NUM_THREADS", "1") // Has no effect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue