From 0bb42a7d958ded3faccf28627598ec013ab9e543 Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Wed, 14 Feb 2024 21:16:16 +0100 Subject: [PATCH] fix(cli): clippy lint for length comparision Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- src/rule/scope.rs | 2 +- src/rule/type.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rule/scope.rs b/src/rule/scope.rs index b01db1a..2cf307a 100644 --- a/src/rule/scope.rs +++ b/src/rule/scope.rs @@ -23,7 +23,7 @@ impl Rule for Scope { const LEVEL: Level = Level::Error; fn message(&self, message: &Message) -> String { - if self.options.len() == 0 { + if self.options.is_empty() { return "scopes are not allowed".to_string(); } diff --git a/src/rule/type.rs b/src/rule/type.rs index 91deeb3..2043d53 100644 --- a/src/rule/type.rs +++ b/src/rule/type.rs @@ -22,7 +22,7 @@ impl Rule for Type { const NAME: &'static str = "type"; const LEVEL: Level = Level::Error; fn message(&self, message: &Message) -> String { - if self.options.len() == 0 { + if self.options.is_empty() { return "types are not allowed".to_string(); }