bolts: fix netbsd/openbsd clippy (#1459)
This commit is contained in:
parent
209d38a768
commit
4a96354276
@ -790,8 +790,7 @@ mod netbsd {
|
||||
#[allow(trivial_numeric_casts)]
|
||||
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<_>>())
|
||||
}
|
||||
|
||||
@ -845,8 +844,7 @@ mod openbsd {
|
||||
#[allow(trivial_numeric_casts)]
|
||||
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<_>>())
|
||||
}
|
||||
}
|
||||
|
@ -642,7 +642,9 @@ fn write_minibsod<W: Write>(writer: &mut BufWriter<W>) -> Result<(), std::io::Er
|
||||
libc::VM_PROC,
|
||||
libc::VM_PROC_MAP,
|
||||
-1,
|
||||
std::mem::size_of::<libc::kinfo_vmentry>() as i32,
|
||||
std::mem::size_of::<libc::kinfo_vmentry>()
|
||||
.try_into()
|
||||
.expect("Invalid libc::kinfo_vmentry size"),
|
||||
];
|
||||
let mib = arr.as_ptr();
|
||||
let miblen = arr.len() as u32;
|
||||
@ -737,7 +739,7 @@ fn write_minibsod<W: Write>(writer: &mut BufWriter<W>) -> Result<(), std::io::Er
|
||||
}
|
||||
// OpenBSD's vm mappings have no knowledge of their paths on disk
|
||||
let i = format!("{}-{}\n", entry.kve_start, entry.kve_end);
|
||||
writer.write(&i.into_bytes())?;
|
||||
writer.write_all(&i.into_bytes())?;
|
||||
entry.kve_start = entry.kve_start + 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user