about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back/write.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_codegen_ssa/back/write.rs')
-rw-r--r--src/librustc_codegen_ssa/back/write.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs
index 92f795acc54..bc20ed6f6c5 100644
--- a/src/librustc_codegen_ssa/back/write.rs
+++ b/src/librustc_codegen_ssa/back/write.rs
@@ -1244,10 +1244,10 @@ fn start_executing_work<B: ExtraBackendMethods>(
         while !codegen_done
             || running > 0
             || (!codegen_aborted
-                && (work_items.len() > 0
-                    || needs_fat_lto.len() > 0
-                    || needs_thin_lto.len() > 0
-                    || lto_import_only_modules.len() > 0
+                && (!work_items.is_empty()
+                    || !needs_fat_lto.is_empty()
+                    || !needs_thin_lto.is_empty()
+                    || !lto_import_only_modules.is_empty()
                     || main_thread_worker_state != MainThreadWorkerState::Idle))
         {
             // While there are still CGUs to be codegened, the coordinator has
@@ -1289,7 +1289,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
                 // Perform the serial work here of figuring out what we're
                 // going to LTO and then push a bunch of work items onto our
                 // queue to do LTO
-                if work_items.len() == 0
+                if work_items.is_empty()
                     && running == 0
                     && main_thread_worker_state == MainThreadWorkerState::Idle
                 {
@@ -1354,7 +1354,7 @@ 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.
-            while !codegen_aborted && work_items.len() > 0 && running < tokens.len() {
+            while !codegen_aborted && !work_items.is_empty() && running < tokens.len() {
                 let (item, _) = work_items.pop().unwrap();
 
                 maybe_start_llvm_timer(prof, cgcx.config(item.module_kind()), &mut llvm_start_time);