mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
22 lines
587 B
Text
22 lines
587 B
Text
error: this block may be rewritten with the `?` operator
|
|
--> $DIR/question_mark.rs:12:2
|
|
|
|
|
12 | if a.is_none() {
|
|
| _____^
|
|
13 | | return None
|
|
14 | | }
|
|
| |_____^ help: replace_it_with: `a?;`
|
|
|
|
|
= note: `-D clippy::question-mark` implied by `-D warnings`
|
|
|
|
error: this block may be rewritten with the `?` operator
|
|
--> $DIR/question_mark.rs:47:3
|
|
|
|
|
47 | if (self.opt).is_none() {
|
|
| _________^
|
|
48 | | return None;
|
|
49 | | }
|
|
| |_________^ help: replace_it_with: `(self.opt)?;`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|