From abbc6ddf240b0c868f18eaa43a310a3da858ced8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 31 Aug 2017 11:40:18 -0700 Subject: [PATCH] Use is_empty() instead of comparing len() with 0. https://github.com/rust-lang-nursery/rust-clippy/wiki#len_zero --- lib/frontend/src/frontend.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index 60b427b715..3c92e24bcc 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -530,7 +530,7 @@ where fn ebb_args_adjustement(&mut self, dest_ebb: Ebb, jump_args: &[Type]) { let ty_to_append: Option> = - if self.builder.ssa.predecessors(dest_ebb).len() == 0 || + if self.builder.ssa.predecessors(dest_ebb).is_empty() || self.builder.ebbs[dest_ebb].pristine { // This is the first jump instruction targeting this Ebb