or_fun_call
lint shouldn't ignore indexing to HashMap types
#6266
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
See also the perf improvement in rustc: rust-lang/rust#78508.
Currently,
or_fun_call
lint doesn't lint on indexing to HashMap types.I tried this code:
I expected to see this happen: A warning to
unwrap_or
method call becausemap[&idx]
maybe expensive (indexing to a hashmap).Instead, this happened: No warning at all.
Meta
cargo clippy -V
: 0.0.212 (2020-10-28 31ee872) from playgroundrustc -Vv
: (2020-10-28 31ee872)Maybe a duplicate of #5821 .
The text was updated successfully, but these errors were encountered: