mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-02 08:38:07 +00:00
fix: Compiler warning about unused map_or
(#7508)
This commit is contained in:
parent
6a4dbd622b
commit
37b7d0f921
1 changed files with 17 additions and 20 deletions
|
@ -67,10 +67,7 @@ pub(crate) fn flask_debug_true(checker: &mut Checker, call: &ExprCall) {
|
|||
return;
|
||||
};
|
||||
|
||||
checker
|
||||
.semantic()
|
||||
.resolve_name(name)
|
||||
.map_or((), |binding_id| {
|
||||
if let Some(binding_id) = checker.semantic().resolve_name(name) {
|
||||
if let Some(Stmt::Assign(StmtAssign { value, .. })) = checker
|
||||
.semantic()
|
||||
.binding(binding_id)
|
||||
|
@ -88,5 +85,5 @@ pub(crate) fn flask_debug_true(checker: &mut Checker, call: &ExprCall) {
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue