Skip to content

Commit 099cd7f

Browse files
authored
Rollup merge of #69653 - matthiaskrgr:needless_bool, r=Dylan-DPC
use conditions directly
2 parents 8ca3e59 + df716b0 commit 099cd7f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/librustc_codegen_llvm/va_arg.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ pub(super) fn emit_va_arg(
117117
// Windows x86_64
118118
("x86_64", true) => {
119119
let target_ty_size = bx.cx.size_of(target_ty).bytes();
120-
let indirect =
121-
if target_ty_size > 8 || !target_ty_size.is_power_of_two() { true } else { false };
120+
let indirect: bool = target_ty_size > 8 || !target_ty_size.is_power_of_two();
122121
emit_ptr_va_arg(bx, addr, target_ty, indirect, Align::from_bytes(8).unwrap(), false)
123122
}
124123
// For all other architecture/OS combinations fall back to using

src/librustc_span/source_map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ impl SourceMap {
689689
whitespace_found = true;
690690
}
691691

692-
if whitespace_found && !c.is_whitespace() { false } else { true }
692+
!whitespace_found || c.is_whitespace()
693693
})
694694
}
695695

0 commit comments

Comments
 (0)