]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/question_mark.txt
Rollup merge of #101389 - lukaslueg:rcgetmutdocs, r=m-ou-se
[rust.git] / src / tools / clippy / 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 ```