Skip to content

Rename *Guard::try_map to filter_map. #140536

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
May 3, 2025

Conversation

zachs18
Copy link
Contributor

@zachs18 zachs18 commented May 1, 2025

Rename std::sync::*Guard::try_map to filter_map.

  1. Analogous to std::cell::Ref(Mut)::filter_map.
  2. Doesn't imply Try genericizability.

r? @Amanieu (or other T-libs-api)

Tracking issue for mapped_lock_guards: #117108

1. analogous to std::cell::Ref(Mut)::filter_map.
2. doesn't imply `Try` genericizability.
@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 May 1, 2025
@Amanieu
Copy link
Member

Amanieu commented May 1, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented May 1, 2025

📌 Commit d2068be has been approved by Amanieu

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 May 1, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#140485 (Optimize the codegen for `Span::from_expansion`)
 - rust-lang#140509 (transmutability: merge contiguous runs with a common destination)
 - rust-lang#140519 (Use select in projection lookup in `report_projection_error`)
 - rust-lang#140521 (interpret: better error message for out-of-bounds pointer arithmetic and accesses)
 - rust-lang#140536 (Rename `*Guard::try_map` to `filter_map`.)
 - rust-lang#140550 (Stabilize `select_unpredictable`)
 - rust-lang#140563 (extend the list of registered dylibs on `test::prepare_cargo_test`)
 - rust-lang#140572 (Add useful comments on `ExprKind::If` variants.)
 - rust-lang#140574 (Add regression test for 133065)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 06599db into rust-lang:master May 3, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 3, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2025
Rollup merge of rust-lang#140536 - zachs18:mapped-guard-filter-map, r=Amanieu

Rename `*Guard::try_map` to `filter_map`.

Rename `std::sync::*Guard::try_map` to `filter_map`.

1. Analogous to `std::cell::Ref(Mut)::filter_map`.
2. Doesn't imply `Try` genericizability.

r? `@Amanieu` (or other T-libs-api)

Tracking issue for `mapped_lock_guards`: rust-lang#117108
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