about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-12-31 16:50:43 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2019-12-31 16:50:43 +0900
commitbf08998b5c4e60816846731245b532ef14d92d37 (patch)
tree65c74054f77b02223c0b5f638688516fba7c4ed8
parent9086b17e14d9a7c50065b72a626822ce488226d8 (diff)
downloadrust-bf08998b5c4e60816846731245b532ef14d92d37.tar.gz
rust-bf08998b5c4e60816846731245b532ef14d92d37.zip
Use `is_empty()`
-rw-r--r--clippy_lints/src/inherent_impl.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/inherent_impl.rs b/clippy_lints/src/inherent_impl.rs
index 73b8d14c5b1..445891ff58a 100644
--- a/clippy_lints/src/inherent_impl.rs
+++ b/clippy_lints/src/inherent_impl.rs
@@ -54,7 +54,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MultipleInherentImpl {
             // Remember for each inherent implementation encoutered its span and generics
             // but filter out implementations that have generic params (type or lifetime)
             // or are derived from a macro
-            if !in_macro(item.span) && generics.params.len() == 0 {
+            if !in_macro(item.span) && generics.params.is_empty() {
                 self.impls.insert(item.hir_id.owner_def_id(), item.span);
             }
         }