mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
refactor(transformer): deref SymbolId immediately (#5836)
Tiny refactor. Deref `&SymbolId` to `SymbolId` as early as possible.
This commit is contained in:
1 parent
56703a3a59
commit
3dd188c139
1 file changed
+2
-2
@@ -245,8 +245,8 @@ impl<'a> ArrowFunctions<'a> {
|
||||
let this_var = self.this_var_stack.last_mut().unwrap();
|
||||
if this_var.is_none() {
|
||||
let target_scope_id =
|
||||
ctx.scopes().ancestors(ctx.current_scope_id()).skip(1).find(|scope_id| {
|
||||
let scope_flags = ctx.scopes().get_flags(*scope_id);
|
||||
ctx.scopes().ancestors(ctx.current_scope_id()).skip(1).find(|&scope_id| {
|
||||
let scope_flags = ctx.scopes().get_flags(scope_id);
|
||||
scope_flags.intersects(ScopeFlags::Function | ScopeFlags::Top)
|
||||
&& !scope_flags.contains(ScopeFlags::Arrow)
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user