diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 68a4b7898575..5bff8480d591 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -239,7 +239,7 @@ pub fn check_whitelist(path: &Path, cargo: &Path, bad: &mut bool) { unapproved.append(&mut bad); } - if unapproved.len() > 0 { + if !unapproved.is_empty() { println!("Dependencies not on the whitelist:"); for dep in unapproved { println!("* {}", dep.id_str()); diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index c95f1c7b32a9..05eeae7d6b01 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -133,7 +133,7 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) { name); } - if gate_untested.len() > 0 { + if !gate_untested.is_empty() { tidy_error!(bad, "Found {} features without a gate test.", gate_untested.len()); }