]> git.lizzy.rs Git - rust.git/commitdiff
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)
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`


No differences found