about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorThibaut Vandervelden <thvdveld@vub.be>2023-07-20 11:49:27 +0200
committerThibaut Vandervelden <thvdveld@vub.be>2023-07-20 12:04:24 +0200
commitf743fec6b0fdeb3c980e350043116bd30e364126 (patch)
tree603234913cee766b73a2404381bd25cfc5364628 /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent0f31fff59ed0d2416043a291ab4c30a3d036648e (diff)
downloadrust-f743fec6b0fdeb3c980e350043116bd30e364126.tar.gz
rust-f743fec6b0fdeb3c980e350043116bd30e364126.zip
fix: false positive for `option_env!` in ifs
Clippy had a false positive for with `ifs_same_cond` when two
if-let expressions have an `option_env!` macro. The fix is similar to the
`env!` macro fix.

The following example had a clippy error:

```rust
if let Some(env1) = option_env!("ENV1") {
    // ...
} else if let Some(env2) = option_env!("ENV2") {
    // ...
}
```

See https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=01b85c61b56ddd900117fb247af04824

changelog: Fix [`ifs_same_cond`] false positive when using `option_env!` in if-let expressions.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions