From 0f3f293606892d482738713a9bf2c0abf45ea7d0 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Sat, 11 Jun 2022 04:38:52 +0900 Subject: [PATCH] fixed cargo clippy error --- src/yaml.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/yaml.rs b/src/yaml.rs index 265f7dad..97522faf 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -226,12 +226,11 @@ impl ParseYaml { .no_use_rule .get(&rule_id.unwrap_or(&String::default()).to_string()) { - let entry_key; - if v.contains("exclude_rule") { - entry_key = "excluded"; + let entry_key = if v.contains("exclude_rule") { + "excluded" } else { - entry_key = "noisy"; - } + "noisy" + }; let entry = self.rule_load_cnt.entry(entry_key.to_string()).or_insert(0); *entry += 1; return Option::None;