mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-29 06:44:49 +00:00
Remove useless and_then
This commit is contained in:
parent
70f8e04af3
commit
9155ed3826
1 changed files with 12 additions and 13 deletions
|
@ -414,7 +414,7 @@ impl SymbolTableAnalyzer {
|
||||||
st_typ: SymbolTableType,
|
st_typ: SymbolTableType,
|
||||||
) -> Option<SymbolScope> {
|
) -> Option<SymbolScope> {
|
||||||
sub_tables.iter().find_map(|st| {
|
sub_tables.iter().find_map(|st| {
|
||||||
st.symbols.get(name).and_then(|sym| {
|
let sym = st.symbols.get(name)?;
|
||||||
if sym.scope == SymbolScope::Free || sym.flags.contains(SymbolFlags::FREE_CLASS) {
|
if sym.scope == SymbolScope::Free || sym.flags.contains(SymbolFlags::FREE_CLASS) {
|
||||||
if st_typ == SymbolTableType::Class && name != "__class__" {
|
if st_typ == SymbolTableType::Class && name != "__class__" {
|
||||||
None
|
None
|
||||||
|
@ -429,7 +429,6 @@ impl SymbolTableAnalyzer {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements the symbol analysis and scope extension for names
|
// Implements the symbol analysis and scope extension for names
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue