Skip to content

Commit

Permalink
fix(cli): clippy lint for length comparision (#274)
Browse files Browse the repository at this point in the history
Signed-off-by: KeisukeYamashita <[email protected]>
  • Loading branch information
KeisukeYamashita authored Feb 14, 2024
1 parent c26f3b6 commit f46aa22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rule/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/rule/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit f46aa22

Please sign in to comment.