Skip to content

refactor(all): shorten redundant std::vec::Vec#23748

Merged
graphite-app[bot] merged 1 commit into
mainfrom
om/06-23-refactor_all_shorten_redundant_std_vec_vec_
Jun 24, 2026
Merged

refactor(all): shorten redundant std::vec::Vec#23748
graphite-app[bot] merged 1 commit into
mainfrom
om/06-23-refactor_all_shorten_redundant_std_vec_vec_

Conversation

@overlookmotel

@overlookmotel overlookmotel commented Jun 23, 2026

Copy link
Copy Markdown
Member

Pure refactor.

#23748 made all usages of arena-allocated Vec be named ArenaVec. This makes plain Vec unambiguously refer to heap-allocated Vec from standard library.

Shorten std::vec::Vec to just Vec in various places.

overlookmotel commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of 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.

@github-actions github-actions Bot added A-linter Area - Linter A-parser Area - Parser A-minifier Area - Minifier A-ast Area - AST A-transformer Area - Transformer / Transpiler A-formatter Area - Formatter labels Jun 23, 2026
@codspeed-hq

codspeed-hq Bot commented Jun 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 9 skipped benchmarks1


Comparing om/06-23-refactor_all_shorten_redundant_std_vec_vec_ (e3b8849) with om/06-23-refactor_all_import_arena_box_and_vec_as_arenabox___arenavec_ (2ea7dcc)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@overlookmotel overlookmotel marked this pull request as ready for review June 23, 2026 20:11
Copilot AI review requested due to automatic review settings June 23, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors several Rust modules across the workspace to shorten explicit std::vec::Vec type paths to the prelude Vec, now that arena vectors are consistently named ArenaVec (per prior refactor) and Vec is unambiguous.

Changes:

  • Replaced std::vec::Vec<T> with Vec<T> in function signatures and local variable declarations.
  • Simplified a few collect::<std::vec::Vec<_>>() / std::vec::Vec::len uses to collect::<Vec<_>>() / Vec::len.
  • Kept arena-allocated vectors using ArenaVec, preserving the heap-vs-arena distinction.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/oxc_transformer/src/common/module_imports.rs Uses Vec<Import<'a>> for heap-allocated name lists passed into import/require generation.
crates/oxc_regular_expression/src/parser/pattern_parser/pattern_parser_impl.rs Simplifies a diagnostic helper local names collection to Vec<&str>.
crates/oxc_parser/src/module_record.rs Shortens public-returned error list types to Vec<OxcDiagnostic> while keeping arena storage as ArenaVec.
crates/oxc_minifier/src/peephole/substitute_alternate_syntax.rs Simplifies an iterator collect to Vec before join.
crates/oxc_minifier/src/keep_var.rs Stores hoisted vars in Vec<...> without fully qualifying the path.
crates/oxc_linter/src/rules/react/jsx_curly_brace_presence.rs Simplifies several collect::<...>() and a helper return type to Vec.
crates/oxc_formatter/src/formatter/jsdoc/wrap.rs Shortens std::vec::Vec::len to Vec::len when computing column counts.
crates/oxc_ecmascript/src/constant_evaluation/call_expr.rs Uses Vec::new() for temporary number collection in math folding.
crates/oxc_ast/src/ast_impl/js.rs Simplifies helper signatures/returns to Vec for collected identifiers and symbol ids.

@overlookmotel overlookmotel force-pushed the om/06-23-refactor_all_import_arena_box_and_vec_as_arenabox___arenavec_ branch from 4b2595a to 2ea7dcc Compare June 23, 2026 20:30
@overlookmotel overlookmotel force-pushed the om/06-23-refactor_all_shorten_redundant_std_vec_vec_ branch from 44b3134 to e3b8849 Compare June 23, 2026 20:30
@graphite-app graphite-app Bot added the 0-merge Merge with Graphite Merge Queue label Jun 24, 2026
@graphite-app

graphite-app Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Merge activity

Pure refactor.

#23748 made all usages of arena-allocated `Vec` be named `ArenaVec`. This makes plain `Vec` unambiguously refer to heap-allocated `Vec` from standard library.

Shorten `std::vec::Vec` to just `Vec` in various places.
@graphite-app graphite-app Bot force-pushed the om/06-23-refactor_all_import_arena_box_and_vec_as_arenabox___arenavec_ branch from 2ea7dcc to d1f18cd Compare June 24, 2026 01:22
@graphite-app graphite-app Bot force-pushed the om/06-23-refactor_all_shorten_redundant_std_vec_vec_ branch from e3b8849 to f65d8e5 Compare June 24, 2026 01:22
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jun 24, 2026
Base automatically changed from om/06-23-refactor_all_import_arena_box_and_vec_as_arenabox___arenavec_ to main June 24, 2026 01:27
@graphite-app graphite-app Bot merged commit f65d8e5 into main Jun 24, 2026
32 checks passed
@graphite-app graphite-app Bot deleted the om/06-23-refactor_all_shorten_redundant_std_vec_vec_ branch June 24, 2026 01:28
camc314 pushed a commit that referenced this pull request Jul 3, 2026
Pure refactor.

#23748 made all usages of arena-allocated `Vec` be named `ArenaVec`. This makes plain `Vec` unambiguously refer to heap-allocated `Vec` from standard library.

Shorten `std::vec::Vec` to just `Vec` in various places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-formatter Area - Formatter A-linter Area - Linter A-minifier Area - Minifier A-parser Area - Parser A-transformer Area - Transformer / Transpiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants