rust/clippy_dev
bors 5ead90f13a Auto merge of #12150 - ithinuel:add_misleading_use_of_ok, r=y21
Add lint for `unused_result_ok`

This PR adds a lint to capture the use of `expr.ok();` when the result is not _really_ used.

This could be interpreted as the result being checked (like it is with `unwrap()` or `expect`) but
it actually only ignores the result.

`let _ = expr;` expresses that intent better.

This was also mentionned in #8994 (although not being the main topic of that issue).

changelog: [`misleading_use_of_ok`]: Add new lint to capture `.ok();` when the result is not _really_ used.
2024-08-06 19:01:41 +00:00
..
src Auto merge of #12150 - ithinuel:add_misleading_use_of_ok, r=y21 2024-08-06 19:01:41 +00:00
Cargo.toml Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00