diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-08-25 08:50:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-25 08:50:59 +0900 |
| commit | df354f5cf6e0c0a68d7c4d1b1d945182eb7d7811 (patch) | |
| tree | 58ea75ae736ceff488adf5f81bdedaaddf210e96 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 0fd4a74139347edc1429de3f9d397ec6583698fd (diff) | |
| parent | eb2fdd917ef05184c7ef2eab707183b07d68ff5e (diff) | |
| download | rust-df354f5cf6e0c0a68d7c4d1b1d945182eb7d7811.tar.gz rust-df354f5cf6e0c0a68d7c4d1b1d945182eb7d7811.zip | |
Rollup merge of #100921 - ChayimFriedman2:and-eager-eval, r=JohnTitor
Add a warning about `Option/Result::and()` being eagerly evaluated Copied from `or()`. Inspired by [this StackOverflow question](https://stackoverflow.com/questions/73461846/why-is-in-rust-the-expression-in-option-and-evaluated-if-option-is-none). [The PR for `or()`](https://github.com/rust-lang/rust/pull/46548) mentions the Clippy lint `or_fun_call` which doesn't exist for `and()` (although there is `unnecessary_lazy_evaluations`). I still think this warning is also good for `and()`. Feel free to close if you disagree.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
