mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(semantic)!: remove SymbolTable::rename method (#7868)
Remove `SymbolTable::rename` method. We also have `SymbolTable::set_name` method which does the same thing.
This commit is contained in:
parent
624398083a
commit
c0714945b2
2 changed files with 1 additions and 6 deletions
|
|
@ -101,11 +101,6 @@ impl SymbolTable {
|
|||
}
|
||||
|
||||
/// Rename a symbol.
|
||||
#[inline]
|
||||
pub fn rename(&mut self, symbol_id: SymbolId, new_name: CompactStr) {
|
||||
self.names[symbol_id] = new_name;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_name(&mut self, symbol_id: SymbolId, name: CompactStr) {
|
||||
self.names[symbol_id] = name;
|
||||
|
|
|
|||
|
|
@ -905,7 +905,7 @@ impl<'a> ArrowFunctionConverter<'a> {
|
|||
/// Rename the `arguments` symbol to a new name.
|
||||
fn rename_arguments_symbol(symbol_id: SymbolId, name: CompactStr, ctx: &mut TraverseCtx<'a>) {
|
||||
let scope_id = ctx.symbols().get_scope_id(symbol_id);
|
||||
ctx.symbols_mut().rename(symbol_id, name.clone());
|
||||
ctx.symbols_mut().set_name(symbol_id, name.clone());
|
||||
ctx.scopes_mut().rename_binding(scope_id, "arguments", name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue