X Tutup
The Wayback Machine - https://web.archive.org/web/20250801162737/https://github.com/nodejs/node/pull/59304
Skip to content

src: replace v.find() == v.end() with C++20 contains() #59304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iknoom
Copy link

@iknoom iknoom commented Jul 31, 2025

This PR refactors several v.find(...) == v.end() and v.find(...) != v.end() to use more expressive and readable C++20 contains() method.

Refactors several `v.find(...) == v.end()` and `v.find(...) != v.end()`
to use more expressive and readable C++20 `contains()` method.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/inspector
  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 31, 2025
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.98%. Comparing base (5ebfb99) to head (2fcd370).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/node_blob.cc 50.00% 0 Missing and 1 partial ⚠️
src/node_messaging.cc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59304      +/-   ##
==========================================
+ Coverage   89.97%   89.98%   +0.01%     
==========================================
  Files         649      649              
  Lines      192194   192193       -1     
  Branches    37678    37684       +6     
==========================================
+ Hits       172918   172951      +33     
+ Misses      11873    11834      -39     
- Partials     7403     7408       +5     
Files with missing lines Coverage Δ
src/inspector/io_agent.cc 100.00% <100.00%> (ø)
src/inspector_profiler.h 85.71% <100.00%> (-0.65%) ⬇️
src/node_builtins.cc 79.56% <100.00%> (ø)
src/node_env_var.cc 83.23% <100.00%> (ø)
src/signal_wrap.cc 80.43% <100.00%> (ø)
src/node_blob.cc 76.22% <50.00%> (+0.54%) ⬆️
src/node_messaging.cc 83.12% <0.00%> (+0.26%) ⬆️

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
X Tutup