From df6d9dc1c390d86b378c103ec03dc75af2474d10 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 3 Oct 2021 16:59:54 +0530 Subject: consistent naming --- lib/src/lints/bool_comparison.rs | 4 ++-- lib/src/lints/empty_let_in.rs | 4 ++-- lib/src/lints/manual_inherit.rs | 4 ++-- lib/src/lints/manual_inherit_from.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/lints/bool_comparison.rs b/lib/src/lints/bool_comparison.rs index d23a4b0..0b5733b 100644 --- a/lib/src/lints/bool_comparison.rs +++ b/lib/src/lints/bool_comparison.rs @@ -18,8 +18,8 @@ struct BoolComparison; impl Rule for BoolComparison { fn validate(&self, node: &SyntaxElement) -> Option { if_chain! { - if let NodeOrToken::Node(bin_op_node) = node; - if let Some(bin_expr) = BinOp::cast(bin_op_node.clone()); + if let NodeOrToken::Node(node) = node; + if let Some(bin_expr) = BinOp::cast(node.clone()); if let Some(lhs) = bin_expr.lhs(); if let Some(rhs) = bin_expr.rhs(); diff --git a/lib/src/lints/empty_let_in.rs b/lib/src/lints/empty_let_in.rs index 207d253..aae1377 100644 --- a/lib/src/lints/empty_let_in.rs +++ b/lib/src/lints/empty_let_in.rs @@ -18,8 +18,8 @@ struct EmptyLetIn; impl Rule for EmptyLetIn { fn validate(&self, node: &SyntaxElement) -> Option { if_chain! { - if let NodeOrToken::Node(let_in_node) = node; - if let Some(let_in_expr) = LetIn::cast(let_in_node.clone()); + if let NodeOrToken::Node(node) = node; + if let Some(let_in_expr) = LetIn::cast(node.clone()); let entries = let_in_expr.entries(); let inherits = let_in_expr.inherits(); diff --git a/lib/src/lints/manual_inherit.rs b/lib/src/lints/manual_inherit.rs index c1b10ec..717d190 100644 --- a/lib/src/lints/manual_inherit.rs +++ b/lib/src/lints/manual_inherit.rs @@ -18,8 +18,8 @@ struct ManualInherit; impl Rule for ManualInherit { fn validate(&self, node: &SyntaxElement) -> Option { if_chain! { - if let NodeOrToken::Node(key_value_node) = node; - if let Some(key_value_stmt) = KeyValue::cast(key_value_node.clone()); + if let NodeOrToken::Node(node) = node; + if let Some(key_value_stmt) = KeyValue::cast(node.clone()); if let Some(key_path) = key_value_stmt.key(); if let Some(key_node) = key_path.path().next(); if let Some(key) = Ident::cast(key_node); diff --git a/lib/src/lints/manual_inherit_from.rs b/lib/src/lints/manual_inherit_from.rs index 055cba2..41eb5cf 100644 --- a/lib/src/lints/manual_inherit_from.rs +++ b/lib/src/lints/manual_inherit_from.rs @@ -18,8 +18,8 @@ struct ManualInherit; impl Rule for ManualInherit { fn validate(&self, node: &SyntaxElement) -> Option { if_chain! { - if let NodeOrToken::Node(key_value_node) = node; - if let Some(key_value_stmt) = KeyValue::cast(key_value_node.clone()); + if let NodeOrToken::Node(node) = node; + if let Some(key_value_stmt) = KeyValue::cast(node.clone()); if let Some(key_path) = key_value_stmt.key(); if let Some(key_node) = key_path.path().next(); if let Some(key) = Ident::cast(key_node); -- cgit v1.2.3