mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 00:53:31 +00:00
20 lines
558 B
Text
20 lines
558 B
Text
error: this block may be rewritten with the `?` operator
|
|
--> $DIR/question_mark.rs:11:5
|
|
|
|
|
11 | / if a.is_none() {
|
|
12 | | return None;
|
|
13 | | }
|
|
| |_____^ 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:46:9
|
|
|
|
|
46 | / if (self.opt).is_none() {
|
|
47 | | return None;
|
|
48 | | }
|
|
| |_________^ help: replace_it_with: `(self.opt)?;`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|