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
..
2024-07-17 14:05:49 -04:00
2024-07-19 16:10:24 -04:00
2024-07-17 14:05:49 -04:00
2024-07-19 16:10:24 -04:00
2024-07-06 22:13:45 -04:00
2024-07-17 14:05:49 -04:00
2024-07-05 03:12:19 -04:00
2024-07-26 17:51:22 +08:00
2024-07-07 16:23:18 -04:00
2024-03-10 23:33:00 +08:00
2024-07-17 14:05:49 -04:00
2024-07-07 22:13:05 -04:00
2024-04-15 18:48:12 -04:00
2024-05-17 18:33:37 -03:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-26 17:51:22 +08:00
2024-07-17 14:05:49 -04:00
2024-03-22 11:13:29 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00