Use is_some_and/is_ok_and in less obvious spots

This commit is contained in:
Maybe Waffle 2023-05-24 14:33:43 +00:00
parent fb0f74a8c9
commit 307799a711
19 changed files with 53 additions and 88 deletions

View file

@ -125,8 +125,7 @@ impl CodegenCx<'_, '_> {
// Thread-local variables generally don't support copy relocations.
let is_thread_local_var = llvm::LLVMIsAGlobalVariable(llval)
.map(|v| llvm::LLVMIsThreadLocal(v) == llvm::True)
.unwrap_or(false);
.is_some_and(|v| llvm::LLVMIsThreadLocal(v) == llvm::True);
if is_thread_local_var {
return false;
}