Skip to content

use try_fold instead of fold #139056

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

Merged
merged 1 commit into from
Mar 29, 2025
Merged

Conversation

yotamofek
Copy link
Contributor

Small cleanup, applies the manual_try_fold clippy lint.

@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2025

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

@scottmcm
Copy link
Member

Cool, definitely more elegant this way.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 28, 2025

📌 Commit 827cb1b has been approved by scottmcm

It is now in the queue for this repository.

@bors bors 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 Mar 28, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 29, 2025
…tmcm

use `try_fold` instead of `fold`

Small cleanup, applies the [`manual_try_fold`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold) clippy lint.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138832 (Start using `with_native_path` in `std::sys::fs`)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 29, 2025
…tmcm

use `try_fold` instead of `fold`

Small cleanup, applies the [`manual_try_fold`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold) clippy lint.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)
 - rust-lang#139097 (Add more tests for pin!().)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0e722cc into rust-lang:master Mar 29, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Mar 29, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup merge of rust-lang#139056 - yotamofek:pr/smir/try_fold, r=scottmcm

use `try_fold` instead of `fold`

Small cleanup, applies the [`manual_try_fold`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold) clippy lint.
@yotamofek yotamofek deleted the pr/smir/try_fold branch April 4, 2025 21:36
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-compiler Relevant to the compiler 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