Commit 0307f60
committed
Resolve question_mark clippy lint in build script
warning: this `match` expression can be replaced with `?`
--> serde/build.rs:111:17
|
111 | let rustc = match env::var_os("RUSTC") {
| _________________^
112 | | Some(rustc) => rustc,
113 | | None => return None,
114 | | };
| |_____^ help: try instead: `env::var_os("RUSTC")?`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `-W clippy::question-mark` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::question_mark)]`
warning: this `match` expression can be replaced with `?`
--> serde/build.rs:131:16
|
131 | let next = match pieces.next() {
| ________________^
132 | | Some(next) => next,
133 | | None => return None,
134 | | };
| |_____^ help: try instead: `pieces.next()?`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark1 parent 8939af4 commit 0307f60
1 file changed
+5
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
126 | 114 | | |
127 | 115 | | |
128 | 116 | | |
129 | 117 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 118 | + | |
137 | 119 | | |
0 commit comments