Remove useless and_then

This commit is contained in:
Jeong YunWon 2023-03-18 21:50:08 +09:00
parent 70f8e04af3
commit 9155ed3826

View file

@ -414,7 +414,7 @@ impl SymbolTableAnalyzer {
st_typ: SymbolTableType,
) -> Option<SymbolScope> {
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 st_typ == SymbolTableType::Class && name != "__class__" {
None
@ -429,7 +429,6 @@ impl SymbolTableAnalyzer {
None
}
})
})
}
// Implements the symbol analysis and scope extension for names