]> git.lizzy.rs Git - rust.git/blob - src/docs/nonsensical_open_options.txt
[Arithmetic] Consider literals
[rust.git] / src / docs / nonsensical_open_options.txt
1 ### What it does
2 Checks for duplicate open options as well as combinations
3 that make no sense.
4
5 ### Why is this bad?
6 In the best case, the code will be harder to read than
7 necessary. I don't know the worst case.
8
9 ### Example
10 ```
11 use std::fs::OpenOptions;
12
13 OpenOptions::new().read(true).truncate(true);
14 ```