bolts core affinity illumos clippy fixes (#1497)
This commit is contained in:
parent
f27107c5e4
commit
1b6ef52a4e
@ -872,8 +872,7 @@ mod solaris {
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
pub fn get_core_ids() -> Result<Vec<CoreId>, Error> {
|
||||
Ok((0..(usize::from(available_parallelism()?)))
|
||||
.into_iter()
|
||||
.map(|n| CoreId(n))
|
||||
.map(CoreId)
|
||||
.collect::<Vec<_>>())
|
||||
}
|
||||
|
||||
@ -882,7 +881,7 @@ mod solaris {
|
||||
libc::processor_bind(
|
||||
libc::P_PID,
|
||||
libc::PS_MYID,
|
||||
core_id.0 as i32,
|
||||
core_id.0.try_into().unwrap(),
|
||||
std::ptr::null_mut(),
|
||||
)
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user