Skip to content
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

feat: add assist for applying De Morgan's law to Iterator::all and Iterator::any #15700

Merged
merged 2 commits into from Oct 4, 2023

Conversation

rmehri01
Copy link
Contributor

@rmehri01 rmehri01 commented Oct 2, 2023

This PR adds an assist for transforming expressions of the form !iter.any(|x| predicate(x)) into iter.all(|x| !predicate(x)) and vice versa.

IteratorDeMorgans.webm

Closes #15694

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 2, 2023
@Veykril
Copy link
Member

Veykril commented Oct 4, 2023

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Oct 4, 2023

📌 Commit c266387 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Oct 4, 2023

⌛ Testing commit c266387 with merge 7e9da40...

@bors
Copy link
Collaborator

bors commented Oct 4, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 7e9da40 to master...

@bors bors merged commit 7e9da40 into rust-lang:master Oct 4, 2023
10 checks passed
@rmehri01 rmehri01 deleted the 15694_iterator_demorgan branch October 10, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

De Morgan's law assist on all and any
4 participants