Clippy fix (#978)

* fix

* mac

* clp
This commit is contained in:
Dongjia "toka" Zhang 2023-01-02 20:35:41 +09:00 committed by GitHub
parent 43425cf103
commit d2985c5b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

View File

@ -566,7 +566,6 @@ mod apple {
#[allow(clippy::unnecessary_wraps)] #[allow(clippy::unnecessary_wraps)]
pub fn get_core_ids() -> Result<Vec<CoreId>, Error> { pub fn get_core_ids() -> Result<Vec<CoreId>, Error> {
Ok((0..(usize::from(available_parallelism()?))) Ok((0..(usize::from(available_parallelism()?)))
.into_iter()
.map(|n| CoreId { id: n }) .map(|n| CoreId { id: n })
.collect::<Vec<_>>()) .collect::<Vec<_>>())
} }

View File

@ -1242,7 +1242,7 @@ mod tests {
let executor = ForkserverExecutorBuilder::new() let executor = ForkserverExecutorBuilder::new()
.program(bin) .program(bin)
.args(&args) .args(args)
.debug_child(false) .debug_child(false)
.shmem_provider(&mut shmem_provider) .shmem_provider(&mut shmem_provider)
.build::<_, ()>(tuple_list!(edges_observer)); .build::<_, ()>(tuple_list!(edges_observer));

View File

@ -47,7 +47,7 @@ impl FridaRuntime for DrCovRuntime {
hasher.write(input.target_bytes().as_slice()); hasher.write(input.target_bytes().as_slice());
let filename = format!("./coverage/{:016x}.drcov", hasher.finish(),); let filename = format!("./coverage/{:016x}.drcov", hasher.finish(),);
DrCovWriter::new(&self.ranges).write(&filename, &self.drcov_basic_blocks)?; DrCovWriter::new(&self.ranges).write(filename, &self.drcov_basic_blocks)?;
self.drcov_basic_blocks.clear(); self.drcov_basic_blocks.clear();
Ok(()) Ok(())

View File

@ -165,7 +165,7 @@ where
}; };
// Allow because we're sure this isn't from a different code generation unit. // Allow because we're sure this isn't from a different code generation unit.
#[allow(clippy::fn_address_comparisons)] #[allow(clippy::fn_address_comparisons, clippy::fn_null_check)]
if !(prev as *const libc::c_void).is_null() && prev != pthread_introspection_hook { if !(prev as *const libc::c_void).is_null() && prev != pthread_introspection_hook {
PREVIOUS_HOOK.set(prev); PREVIOUS_HOOK.set(prev);
} }