mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 16:08:05 +00:00
fae23fea97
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1460:5
|
1460 | / let string = match get_lit_str(cx, attr_name, meta)? {
1461 | | Some(string) => string,
1462 | | None => return Ok(None),
1463 | | };
| |______^ help: consider writing: `let Some(string) = get_lit_str(cx, attr_name, meta)? else { return Ok(None) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1482:5
|
1482 | / let string = match get_lit_str(cx, attr_name, meta)? {
1483 | | Some(string) => string,
1484 | | None => return Ok(None),
1485 | | };
| |______^ help: consider writing: `let Some(string) = get_lit_str(cx, attr_name, meta)? else { return Ok(None) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1505:5
|
1505 | / let string = match get_lit_str2(cx, attr_name, meta_item_name, meta)? {
1506 | | Some(string) => string,
1507 | | None => return Ok(Vec::new()),
1508 | | };
| |______^ help: consider writing: `let Some(string) = get_lit_str2(cx, attr_name, meta_item_name, meta)? else { return Ok(Vec::new()) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1526:5
|
1526 | / let string = match get_lit_str(cx, attr_name, meta)? {
1527 | | Some(string) => string,
1528 | | None => return Ok(None),
1529 | | };
| |______^ help: consider writing: `let Some(string) = get_lit_str(cx, attr_name, meta)? else { return Ok(None) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1549:5
|
1549 | / let string = match get_lit_str(cx, BORROW, meta)? {
1550 | | Some(string) => string,
1551 | | None => return Ok(BTreeSet::new()),
1552 | | };
| |______^ help: consider writing: `let Some(string) = get_lit_str(cx, BORROW, meta)? else { return Ok(BTreeSet::new()) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1621:5
|
1621 | / let seg = match path.segments.last() {
1622 | | Some(seg) => seg,
1623 | | None => {
1624 | | return false;
1625 | | }
1626 | | };
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
help: consider writing
|
1621 ~ let Some(seg) = path.segments.last() else {
1622 + return false;
1623 + };
|
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/attr.rs:1648:5
|
1648 | / let seg = match path.segments.last() {
1649 | | Some(seg) => seg,
1650 | | None => {
1651 | | return false;
1652 | | }
1653 | | };
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
help: consider writing
|
1648 ~ let Some(seg) = path.segments.last() else {
1649 + return false;
1650 + };
|
warning: this could be rewritten as `let...else`
--> serde_derive/src/internals/ctxt.rs:49:9
|
49 | / let mut combined = match errors.next() {
50 | | Some(first) => first,
51 | | None => return Ok(()),
52 | | };
| |__________^ help: consider writing: `let Some(mut combined) = errors.next() else { return Ok(()) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> serde_derive/src/de.rs:29:5
|
29 | / let cont = match Container::from_ast(&ctxt, input, Derive::Deserialize, &private...
30 | | Some(cont) => cont,
31 | | None => return Err(ctxt.check().unwrap_err()),
32 | | };
| |______^ help: consider writing: `let Some(cont) = Container::from_ast(&ctxt, input, Derive::Deserialize, &private.ident()) else { return Err(ctxt.check().unwrap_err()) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: this could be rewritten as `let...else`
--> serde_derive/src/ser.rs:16:5
|
16 | / let cont = match Container::from_ast(&ctxt, input, Derive::Serialize, &private.i...
17 | | Some(cont) => cont,
18 | | None => return Err(ctxt.check().unwrap_err()),
19 | | };
| |______^ help: consider writing: `let Some(cont) = Container::from_ast(&ctxt, input, Derive::Serialize, &private.ident()) else { return Err(ctxt.check().unwrap_err()) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else