diff options
| author | Mateusz Gacek <96mateusz.gacek@gmail.com> | 2021-02-24 21:06:26 +0100 |
|---|---|---|
| committer | Mateusz Gacek <96mateusz.gacek@gmail.com> | 2021-02-25 14:23:38 +0100 |
| commit | 2f0e9f7d3afb3cb169e58d65261f04215b017561 (patch) | |
| tree | 62ab59f472627a26721070898d93881ede53bd28 /src/test/ui/thinlto | |
| parent | 877be189ad6fa6a50f9fd295296c446892b4009d (diff) | |
| download | rust-2f0e9f7d3afb3cb169e58d65261f04215b017561.tar.gz rust-2f0e9f7d3afb3cb169e58d65261f04215b017561.zip | |
or_fun_call: fix suggestion for `or_insert(vec![])`
Applies for `std::collections::hash_map::Entry` and `std::collections::btree_map::Entry`
Example:
Previously, for the following code:
`let _ = hash_map.entry("test".to_owned()).or_insert(vec![]);`
clippy would suggest to use:
`or_insert_with(vec![])`, which causes a compiler error (E0277).
Now clippy suggests:
`or_insert_with(Vec::new)`
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
