about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDharma Saputra Wijaya <dswijj@gmail.com>2021-10-26 21:22:22 +0800
committerDharma Saputra Wijaya <dswijj@gmail.com>2021-10-26 21:22:22 +0800
commitfb0fbad5caa97da949cb2c6dbc56a1185bb53af9 (patch)
treecd8c603cd4c41f1271f9ceee2a8094a35d9083c7
parent2fd168285a77c0b39941c9b418a6c8418d75d45a (diff)
downloadrust-fb0fbad5caa97da949cb2c6dbc56a1185bb53af9.tar.gz
rust-fb0fbad5caa97da949cb2c6dbc56a1185bb53af9.zip
Rename variable name in `question_mark`
-rw-r--r--clippy_lints/src/question_mark.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs
index 01fa523300a..f63ef163bcb 100644
--- a/clippy_lints/src/question_mark.rs
+++ b/clippy_lints/src/question_mark.rs
@@ -172,8 +172,8 @@ impl QuestionMark {
         }
     }
 
-    fn expression_returns_unmodified_err(cx: &LateContext<'_>, expression: &Expr<'_>, cond_expr: &Expr<'_>) -> bool {
-        match expression.kind {
+    fn expression_returns_unmodified_err(cx: &LateContext<'_>, expr: &Expr<'_>, cond_expr: &Expr<'_>) -> bool {
+        match expr.kind {
             ExprKind::Block(block, _) => {
                 if let Some(return_expression) = Self::return_expression(block) {
                     return Self::expression_returns_unmodified_err(cx, return_expression, cond_expr);
@@ -181,8 +181,8 @@ impl QuestionMark {
 
                 false
             },
-            ExprKind::Ret(Some(expr)) => Self::expression_returns_unmodified_err(cx, expr, cond_expr),
-            ExprKind::Path(_) => path_to_local(expression) == path_to_local(cond_expr),
+            ExprKind::Ret(Some(ret_expr)) => Self::expression_returns_unmodified_err(cx, ret_expr, cond_expr),
+            ExprKind::Path(_) => path_to_local(expr) == path_to_local(cond_expr),
             _ => false,
         }
     }