rustc_codegen_ssa: cleanup nested ifs and a needless match

This commit is contained in:
Yotam Ofek
2025-02-02 13:04:38 +00:00
parent c930bb2cfb
commit 9e5e6a9d0f
4 changed files with 24 additions and 28 deletions

View File

@@ -1537,8 +1537,9 @@ fn start_executing_work<B: ExtraBackendMethods>(
// Spin up what work we can, only doing this while we've got available
// parallelism slots and work left to spawn.
if codegen_state != Aborted {
while !work_items.is_empty() && running_with_own_token < tokens.len() {
let (item, _) = work_items.pop().unwrap();
while running_with_own_token < tokens.len()
&& let Some((item, _)) = work_items.pop()
{
spawn_work(
&cgcx,
&mut llvm_start_time,