]> git.lizzy.rs Git - rust.git/commit
Auto merge of #8163 - pmnoxx:piotr-improve-unwrap-or-default, r=Manishearth
authorbors <bors@rust-lang.org>
Fri, 24 Dec 2021 12:34:09 +0000 (12:34 +0000)
committerbors <bors@rust-lang.org>
Fri, 24 Dec 2021 12:34:09 +0000 (12:34 +0000)
commit8529b2a0561dcee254ee1447aa6bd5d69812b697
tree1118d2b7225a83aacd36d232982ea6b4b01fe238
parent9ae40436d2218f4b9dbdf231565f2732f1511c99
parent2a47dbc7a67ff691ccfddc7b01d07639215c900b
Auto merge of #8163 - pmnoxx:piotr-improve-unwrap-or-default, r=Manishearth

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`