2018-01-31 00:09:16 +01:00
|
|
|
error: this block may be rewritten with the `?` operator
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $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`
|
2018-01-31 00:09:16 +01:00
|
|
|
|
|
|
|
error: this block may be rewritten with the `?` operator
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/question_mark.rs:47:3
|
2018-01-31 00:09:16 +01:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
47 | if (self.opt).is_none() {
|
2018-01-31 00:09:16 +01:00
|
|
|
| _________^
|
2018-10-06 18:18:06 +02:00
|
|
|
48 | | return None;
|
|
|
|
49 | | }
|
2018-01-31 00:09:16 +01:00
|
|
|
| |_________^ help: replace_it_with: `(self.opt)?;`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|