]> git.lizzy.rs Git - rust.git/blob - src/docs/question_mark.txt
Add iter_kv_map lint
[rust.git] / src / docs / question_mark.txt
1 ### What it does
2 Checks for expressions that could be replaced by the question mark operator.
3
4 ### Why is this bad?
5 Question mark usage is more idiomatic.
6
7 ### Example
8 ```
9 if option.is_none() {
10     return None;
11 }
12 ```
13
14 Could be written:
15
16 ```
17 option?;
18 ```