next.js
16c8ea5d - Prefer using join over try_join when you don't want a vec (#98547)

Commit
56 days ago
Prefer using join over try_join when you don't want a vec (#98547) Adopt `join` over `try_join` in a number of places to avoid temporary Vec allocations `try_join` always copies a `Vec<Result<T>>` to a `Result<Vec<T>>` which is sometimes convenient but at least sometimes wasteful if you are immediately transforming into another collection type. Adopt it to turn `primary_modules` into a `SmallVec` since in the vast majority of cases there is only one module and so we can save a bunch of allocations of tiny arrays --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
Parents
Loading