mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 10:17:58 +00:00
93bb9e147c
error: this could be rewritten as `let...else`
--> test_suite/tests/test_annotations.rs:1247:5
|
1247 | / let f1 = match pieces.next() {
1248 | | Some(x) => x,
1249 | | None => return Err(de::Error::invalid_length(0, &"2")),
1250 | | };
| |______^ help: consider writing: `let Some(x) = pieces.next() else { return Err(de::Error::invalid_length(0, &"2")) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-D clippy::manual-let-else` implied by `-D clippy::pedantic`
error: this could be rewritten as `let...else`
--> test_suite/tests/test_annotations.rs:1251:5
|
1251 | / let f2 = match pieces.next() {
1252 | | Some(x) => x,
1253 | | None => return Err(de::Error::invalid_length(1, &"2")),
1254 | | };
| |______^ help: consider writing: `let Some(x) = pieces.next() else { return Err(de::Error::invalid_length(1, &"2")) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
error: this could be rewritten as `let...else`
--> test_suite/tests/test_annotations.rs:1255:5
|
1255 | / let f2 = match f2.parse() {
1256 | | Ok(n) => n,
1257 | | Err(_) => {
1258 | | return Err(de::Error::invalid_value(
... |
1262 | | }
1263 | | };
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
help: consider writing
|
1255 ~ let Ok(n) = f2.parse() else {
1256 + return Err(de::Error::invalid_value(
1257 + Unexpected::Str(f2),
1258 + &"an 8-bit signed integer",
1259 + ));
1260 + };
|