rust-lang/rust-clippy
Auf GitHub ansehen`or_fun_call` isn't always a performance lint
Open
#8.574 geöffnet am 22. März 2022
A-categoryL-nurserygood first issue
Repository-Metriken
- Stars
- (10.406 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)
Beschreibung
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?