rust-lang/rust-clippy
Voir sur GitHub`or_fun_call` isn't always a performance lint
Open
#8 574 ouverte le 22 mars 2022
A-categoryL-nurserygood first issue
Métriques du dépôt
- Stars
- (10 406 stars)
- Métriques de merge PR
- (Merge moyen 19j 22h) (113 PRs mergées en 30 j)
Description
Replacing .unwrap_or(Vec::new()) with .unwrap_or_default() doesn't do anything for performance, they produce identical machine code with optimizations: https://rust.godbolt.org/z/hzTdazGqW.
Perhaps the lint category could be changed or it could be changed to not detect cases where it's not actually a performance warning?