refactor(ast_tools): simplify StructsAndEnums iterator#20941
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Refactors the StructsAndEnums iterator implementation in ast_tools to remove usage of oxc_data_structures::slice_iter::SliceIter and simplify iteration logic.
Changes:
- Simplified
StructsAndEnums::next()implementation intasks/ast_tools/src/schema/mod.rs. - Removed the
oxc_data_structuresdependency (and corresponding lockfile entry). - Updated the generated AST changes watch list to no longer include
crates/oxc_data_structures.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/ast_tools/src/schema/mod.rs | Refactors StructsAndEnums to use slice::Iter and a shorter next() implementation. |
| tasks/ast_tools/Cargo.toml | Removes direct dependency on oxc_data_structures. |
| Cargo.lock | Removes oxc_data_structures from ast_tools dependency list. |
| .github/generated/ast_changes_watch_list.yml | Drops oxc_data_structures paths from the AST watch list. |
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
Refactor. Simplify and shorten the code for `StructsAndEnums` iterator in `ast_tools`.
4f23c14 to
b782a4b
Compare

Refactor. Simplify and shorten the code for
StructsAndEnumsiterator inast_tools.