From ea801225fcd6d2670d080fa6adfdffc94911c24f Mon Sep 17 00:00:00 2001 From: harupy Date: Sun, 4 Sep 2022 10:33:46 +0900 Subject: [PATCH] use is_empty Signed-off-by: harupy --- src/check_ast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_ast.rs b/src/check_ast.rs index cc7fdb084b..a5794c930b 100644 --- a/src/check_ast.rs +++ b/src/check_ast.rs @@ -242,7 +242,7 @@ impl Visitor for Checker<'_> { StmtKind::If { test, .. } => { if self.settings.select.contains(CheckKind::IfTuple.code()) { if let ExprKind::Tuple { elts, .. } = &test.node { - if elts.len() > 0 { + if !elts.is_empty() { self.checks.push(Check { kind: CheckKind::IfTuple, location: stmt.location,