Skip to content

Unify manual_unwrap_or and manual_unwrap_or_default code #14332

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 25, 2025

Conversation

samueltardieu
Copy link
Contributor

Both lints share a lot of characteristics but were implemented in unrelated ways. This unifies them, saving around 100 SLOC in the process, and making one more test trigger the lint. Also, this removes useless blocks in suggestions.

Close #12956

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Mar 1, 2025

r? @Manishearth

rustbot has assigned @Manishearth.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 1, 2025
@samueltardieu samueltardieu marked this pull request as draft March 1, 2025 19:37
@samueltardieu samueltardieu removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 1, 2025
@samueltardieu samueltardieu marked this pull request as ready for review March 1, 2025 21:21
@samueltardieu samueltardieu added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 1, 2025
Both lints share a lot of characteristics but were implemented in
unrelated ways. This unifies them, saving around 100 SLOC in the
process, and making one more test trigger the lint. Also, this removes
useless blocks in suggestions.
@samueltardieu
Copy link
Contributor Author

Rebased

@Manishearth Manishearth added this pull request to the merge queue Mar 25, 2025
Merged via the queue into rust-lang:master with commit 1893e1e Mar 25, 2025
11 checks passed
@samueltardieu samueltardieu deleted the push-youtwprtpztm branch March 25, 2025 19:05
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.

Unify manual_unwrap_or_default and manual_unwrap_or on the same file
3 participants