Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve unwrap_or_else_default when handling unwrap_or_else(XXX::new) #8163

Merged
merged 9 commits into from
Dec 24, 2021

Conversation

pmnoxx
Copy link
Contributor

@pmnoxx pmnoxx commented Dec 24, 2021

changelog: change unwrap_or_else_default to work with std constructors like Vec::new, HashSet::new, HashMap::new.

Notes:

  • Code to handle detecting those constructors is already there. I moved it out to is_default_equivalent_call

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 24, 2021
@pmnoxx pmnoxx force-pushed the piotr-improve-unwrap-or-default branch from 646192a to 709d2ce Compare December 24, 2021 02:35
@pmnoxx pmnoxx closed this Dec 24, 2021
@pmnoxx pmnoxx deleted the piotr-improve-unwrap-or-default branch December 24, 2021 02:49
@pmnoxx pmnoxx restored the piotr-improve-unwrap-or-default branch December 24, 2021 03:13
@pmnoxx pmnoxx reopened this Dec 24, 2021
@pmnoxx pmnoxx force-pushed the piotr-improve-unwrap-or-default branch from 3304436 to 79cf412 Compare December 24, 2021 03:16
@pmnoxx pmnoxx force-pushed the piotr-improve-unwrap-or-default branch from e2c3e48 to db236e6 Compare December 24, 2021 05:43
@pmnoxx pmnoxx marked this pull request as ready for review December 24, 2021 05:43
@pmnoxx pmnoxx changed the title Improve unwrap_or_else_default - WIP Improve unwrap_or_else_default Dec 24, 2021
@pmnoxx pmnoxx changed the title Improve unwrap_or_else_default Improve unwrap_or_else_default when handling unwrap_or_else(XXX::new) Dec 24, 2021
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 24, 2021

📌 Commit 2a47dbc has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Dec 24, 2021

⌛ Testing commit 2a47dbc with merge 1ec2265...

bors added a commit that referenced this pull request Dec 24, 2021
…hearth

Improve `unwrap_or_else_default` when handling `unwrap_or_else(XXX::new)`

changelog:
-  change `unwrap_or_else_default` to work with std constructors like `Vec::new`, `HashSet::new`, `HashMap::new`.

Notes:
- Code to handle detecting those constructors is already there. I moved it out to `is_default_equivalent_call`
@bors
Copy link
Collaborator

bors commented Dec 24, 2021

💔 Test failed - checks-action_test

@xFrednet
Copy link
Member

The changelog entry has to be on the same line like the changelog label. Now it should work without a problem 🙃

@bors retry

@bors
Copy link
Collaborator

bors commented Dec 24, 2021

⌛ Testing commit 2a47dbc with merge 8529b2a...

@bors
Copy link
Collaborator

bors commented Dec 24, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 8529b2a to master...

@bors bors merged commit 8529b2a into rust-lang:master Dec 24, 2021
@pmnoxx pmnoxx deleted the piotr-improve-unwrap-or-default branch December 24, 2021 13:09
# for free to join this conversation on GitHub. Already have an account? # 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.

5 participants