diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2025-09-18 12:25:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-18 12:25:19 +0000 |
| commit | 4a8b7ea7012e427c0e9c6d25130dc0e9a6fd2481 (patch) | |
| tree | 44e22777082c855ec3875e8b13710bf73cb07a91 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 8428b166b286d29cbb25ed0a3772738446a2d045 (diff) | |
| parent | ad21dff50ab20a4a8c306eddffc779dfa9b0ee47 (diff) | |
| download | rust-4a8b7ea7012e427c0e9c6d25130dc0e9a6fd2481.tar.gz rust-4a8b7ea7012e427c0e9c6d25130dc0e9a6fd2481.zip | |
Do not replace `.unwrap_or(vec![])` by `.unwrap_or_default()` (#15699)
`.unwrap_or(vec![])` is as readable as `.unwrap_or_default()`. Also, this ensures by adding tests that expressions such as `.unwrap_or(DEFAULT_LITERAL)` (`0`, `""`, etc.) are not replaced by `.unwrap_or_default()` either. Related to the discussion in the [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/FCP.20concealed_obvious_default) about PR rust-lang/rust-clippy#15037. changelog: [`unwrap_or_default`]: do not replace `.unwrap_or(vec![])` by `.unwrap_or_default()`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
