Skip to content

library: expand HashSet::extract_if coverage#158771

Open
ArshLabs wants to merge 1 commit into
rust-lang:mainfrom
ArshLabs:test/hashset-extract-if-coverage
Open

library: expand HashSet::extract_if coverage#158771
ArshLabs wants to merge 1 commit into
rust-lang:mainfrom
ArshLabs:test/hashset-extract-if-coverage

Conversation

@ArshLabs

@ArshLabs ArshLabs commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

adds separate HashSet::extract_if tests for empty input, consuming no elements & consuming all elements.

the existing test covered one element true/false predicates but did not check the empty case or the yielded elements when everything is extracted so this keeps the coverage focused on normal public behavior & avoids testing post panic iterator behavior.

Tested:

  • python x.py fmt --check
  • git diff --check

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 4, 2026
@rustbot

rustbot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

@jhpratt

jhpratt commented Jul 4, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 99b3d11 has been approved by jhpratt

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 5, 2026
…overage, r=jhpratt

library: expand HashSet::extract_if coverage

adds separate `HashSet::extract_if` tests for empty input, consuming no elements & consuming all elements.

the existing test covered one element `true`/`false` predicates but did not check the empty case or the yielded elements when everything is extracted so this keeps the coverage focused on normal public behavior & avoids testing post panic iterator behavior.

Tested:
- `python x.py fmt --check`
- `git diff --check`
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 5, 2026
…overage, r=jhpratt

library: expand HashSet::extract_if coverage

adds separate `HashSet::extract_if` tests for empty input, consuming no elements & consuming all elements.

the existing test covered one element `true`/`false` predicates but did not check the empty case or the yielded elements when everything is extracted so this keeps the coverage focused on normal public behavior & avoids testing post panic iterator behavior.

Tested:
- `python x.py fmt --check`
- `git diff --check`
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 5, 2026
…overage, r=jhpratt

library: expand HashSet::extract_if coverage

adds separate `HashSet::extract_if` tests for empty input, consuming no elements & consuming all elements.

the existing test covered one element `true`/`false` predicates but did not check the empty case or the yielded elements when everything is extracted so this keeps the coverage focused on normal public behavior & avoids testing post panic iterator behavior.

Tested:
- `python x.py fmt --check`
- `git diff --check`
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors try jobs=test-various

@rust-bors

rust-bors Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 99b3d11 with merge 2b848b1

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/28742614801

rust-bors Bot pushed a commit that referenced this pull request Jul 5, 2026
…<try>

library: expand HashSet::extract_if coverage


try-job: test-various
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 5, 2026
…overage, r=jhpratt

library: expand HashSet::extract_if coverage

adds separate `HashSet::extract_if` tests for empty input, consuming no elements & consuming all elements.

the existing test covered one element `true`/`false` predicates but did not check the empty case or the yielded elements when everything is extracted so this keeps the coverage focused on normal public behavior & avoids testing post panic iterator behavior.

Tested:
- `python x.py fmt --check`
- `git diff --check`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants