Skip to content

Commit 1b6ef52

Browse files
authored
bolts core affinity illumos clippy fixes (#1497)
1 parent f27107c commit 1b6ef52

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libafl_bolts/src/core_affinity.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,7 @@ mod solaris {
872872
#[allow(clippy::unnecessary_wraps)]
873873
pub fn get_core_ids() -> Result<Vec<CoreId>, Error> {
874874
Ok((0..(usize::from(available_parallelism()?)))
875-
.into_iter()
876-
.map(|n| CoreId(n))
875+
.map(CoreId)
877876
.collect::<Vec<_>>())
878877
}
879878

@@ -882,7 +881,7 @@ mod solaris {
882881
libc::processor_bind(
883882
libc::P_PID,
884883
libc::PS_MYID,
885-
core_id.0 as i32,
884+
core_id.0.try_into().unwrap(),
886885
std::ptr::null_mut(),
887886
)
888887
};

0 commit comments

Comments
 (0)