summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/question_mark.txt
blob: 4dc987be881321ef35c6a602aacc9bb101aac56c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
### What it does
Checks for expressions that could be replaced by the question mark operator.

### Why is this bad?
Question mark usage is more idiomatic.

### Example
```
if option.is_none() {
    return None;
}
```

Could be written:

```
option?;
```