use conditions directly

This commit is contained in:
Matthias Krüger 2020-03-03 02:07:15 +01:00
parent 18c275b423
commit df716b0e37
2 changed files with 2 additions and 3 deletions

View File

@ -117,8 +117,7 @@ pub(super) fn emit_va_arg(
// Windows x86_64
("x86_64", true) => {
let target_ty_size = bx.cx.size_of(target_ty).bytes();
let indirect =
if target_ty_size > 8 || !target_ty_size.is_power_of_two() { true } else { false };
let indirect: bool = target_ty_size > 8 || !target_ty_size.is_power_of_two();
emit_ptr_va_arg(bx, addr, target_ty, indirect, Align::from_bytes(8).unwrap(), false)
}
// For all other architecture/OS combinations fall back to using

View File

@ -689,7 +689,7 @@ pub fn span_until_non_whitespace(&self, sp: Span) -> Span {
whitespace_found = true;
}
if whitespace_found && !c.is_whitespace() { false } else { true }
!whitespace_found || c.is_whitespace()
})
}