Skip to content

Commit

Permalink
refactor(transformer): deref SymbolId immediately (#5836)
Browse files Browse the repository at this point in the history
Tiny refactor. Deref `&SymbolId` to `SymbolId` as early as possible.
  • Loading branch information
overlookmotel committed Sep 18, 2024
1 parent 56703a3 commit 3dd188c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/es2015/arrow_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
Expand Down

0 comments on commit 3dd188c

Please sign in to comment.