Rename variable name in question_mark
This commit is contained in:
parent
2fd168285a
commit
fb0fbad5ca
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user