Commit 734d8e9e authored by Tobias Koppers's avatar Tobias Koppers

Cleanup ExportBinding: add constructor methods, push_to, and simplify arms

- Add `ExportBinding::getter`, `::value`, `::getter_setter` constructors to
  eliminate the repeated `Box::new(...)` noise at every call site
- Add `ExportBinding::push_to` to encapsulate the array-encoding logic,
  collapsing the 25-line if+match push block to a single call
- Simplify `LocalBinding` lookup using `let...else` + `bail!`, removing
  the dead `unwrap_or_else` fallback that was unreachable
- Extract `make_assign_target` closure inside `ImportedBinding` to
  deduplicate the identical `AssignTarget::Simple(...)` expression
- Use `Module { .. }` instead of listing each ignored field by name
- Break up the long `debug_assert!` line; wrap remaining long lines
- Remove now-unused `SyntaxContext` and `magic_identifier` imports
Co-Authored-By: 's avatarClaude <noreply@anthropic.com>
parent 25e84157
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment