RS.CLIPPY.NONSENSICAL_OPEN_OPTIONS
Nonsensical combination of options for opening a file
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: nonsensical_open_options. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for duplicate open options as well as combinations that make no sense.
Why is this bad?
In the best case, the code will be harder to read than necessary. I don't know the worst case.
Example
use std::fs::OpenOptions;
OpenOptions::new().read(true).truncate(true);