src: avoid copy by using std::views::keys
We can leverage C++20 and use std::views::keys() which returns std::ranges::elements_view<T, S> which avoids creating a vector for GetBuiltinIds()
Review requested:
- [ ] @nodejs/startup
CI: https://ci.nodejs.org/job/node-test-pull-request/63784/
Codecov Report
Attention: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
Project coverage is 88.00%. Comparing base (
4efb7ae) to head (5d6ffea). Report is 475 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/util-inl.h | 76.92% | 1 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #56080 +/- ##
==========================================
+ Coverage 87.99% 88.00% +0.01%
==========================================
Files 656 656
Lines 188988 188994 +6
Branches 35988 35989 +1
==========================================
+ Hits 166302 166328 +26
+ Misses 15848 15838 -10
+ Partials 6838 6828 -10
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/node_builtins.cc | 78.20% <100.00%> (-0.47%) |
:arrow_down: |
| src/node_builtins.h | 100.00% <100.00%> (ø) |
|
| src/util.h | 91.22% <ø> (ø) |
|
| src/util-inl.h | 83.89% <76.92%> (+0.03%) |
:arrow_up: |
cc @nodejs/build this is blocked by the macOS infra.
14:01:20 ../src/util.h:45:10: fatal error: 'ranges' file not found
14:01:20 #include <ranges>
CI: https://ci.nodejs.org/job/node-test-pull-request/64611/
CI: https://ci.nodejs.org/job/node-test-pull-request/64845/
CI: https://ci.nodejs.org/job/node-test-pull-request/64861/
CI: https://ci.nodejs.org/job/node-test-pull-request/64874/
CI: https://ci.nodejs.org/job/node-test-pull-request/64887/
Landed in d54641cd3883b3be116ea24e7b64744331f265a4