From bf08998b5c4e60816846731245b532ef14d92d37 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 31 Dec 2019 16:50:43 +0900 Subject: [PATCH] Use `is_empty()` --- clippy_lints/src/inherent_impl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/inherent_impl.rs b/clippy_lints/src/inherent_impl.rs index 73b8d14c5..445891ff5 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); } }