fix(turbopack): fix canary build after chunk_groups became a Vec (#100949)
### What? Fixes the canary build. `turbopack-core` doesn't compile since #100928 merged: ``` error[E0599]: no method named `get_index` found for struct `Vec<ChunkGroup>` in the current scope ``` ### Why? This is a semantic merge conflict: - #100935 changed `ChunkGroupInfo::chunk_groups` from an `FxIndexSet<ChunkGroup>` to a `Vec<ChunkGroup>`. - #100928's `ChunkGroupInfo::chunk_group_at` was tested on a base without that change. It still calls `get_index`, which exists only on `IndexSet`. ### How? Use `Vec::get`. It returns the same `Option<&ChunkGroup>`, so the error context and behavior stay the same. No other code has `IndexSet`-only calls on `chunk_groups`. Verified locally with `cargo fmt --check` and with `cargo check -p turbopack-core --all-targets` under `-D warnings`. <!-- NEXT_JS_LLM --> <!-- fleet 4f67c6f7-bbe2-454b-9a17-822a60ef8f7e --> Co-authored-by:vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by:
Tobias Koppers <1365881+sokra@users.noreply.github.com> Co-authored-by:
Luke Sandberg <210140+lukesandberg@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment