RS.CLIPPY.UNUSED_RESULT_OK

Use of `.ok()` to silence `Result`'s `#[must_use]` is misleading. Use `let _ =` instead.

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: unused_result_ok. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for calls to Result::ok() without using the returned Option.

Why is this bad?

Using Result::ok() may look like the result is checked like unwrap or expect would do but it only silences the warning caused by #[must_use] on the Result.

Example

some_function().ok();

Use instead:

let _ = some_function();