Fix F811 false positive with match (#4161)

This commit is contained in:
Jonathan Plasse 2023-04-30 20:39:45 +02:00 committed by GitHub
parent a32617911a
commit 8c97e7922b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 0 deletions

View file

@ -71,6 +71,10 @@ fn alternatives(stmt: RefEquality<Stmt>) -> Vec<Vec<RefEquality<Stmt>>> {
body.iter().map(RefEquality).collect()
}))
.collect(),
StmtKind::Match { cases, .. } => cases
.iter()
.map(|case| case.body.iter().map(RefEquality).collect())
.collect(),
_ => vec![],
}
}