Skip to content

Improve map_unwrap_or lint to support map(f).unwrap_or_default() - #17644

Open
qdot3 wants to merge 2 commits into
rust-lang:masterfrom
qdot3:map_unwrap_or
Open

Improve map_unwrap_or lint to support map(f).unwrap_or_default()#17644
qdot3 wants to merge 2 commits into
rust-lang:masterfrom
qdot3:map_unwrap_or

Conversation

@qdot3

@qdot3 qdot3 commented Aug 28, 2026

Copy link
Copy Markdown

Option::map_or_default/Result::map_or_default was stabilized in Rust 1.98.0, so the map_unwrap_or lint should also cover map(f).unwrap_or_default(), suggesting map_or_default(f) instead.

changelog: [map_unwrap_or]: extend to support map(f).unwrap_or_default()

@rustbot rustbot added the S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. label Aug 28, 2026
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome!

You should hear from one of our reviewers after this PR gets at least 2 reviews from the community.

Please see the contribution instructions for more information.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Lintcheck changes for d475df0

Lint Added Removed Changed
clippy::map_unwrap_or 13 0 0

This comment will be updated if you push new changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. 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.

2 participants