warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
--> serde_derive/src/lib.rs:46:5
|
46 | clippy::let_underscore_drop,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/de.rs:1813:39
|
1813 | let map = content.iter().map(|&(ref k, ref v)| {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `-D clippy::needless-borrowed-reference` implied by `-D clippy::all`
help: try removing the `&` and `ref` parts
|
1813 - let map = content.iter().map(|&(ref k, ref v)| {
1813 + let map = content.iter().map(|(k, v)| {
|
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/de.rs:2110:25
|
2110 | let &(ref variant, ref value) = match iter.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
2110 - let &(ref variant, ref value) = match iter.next() {
2110 + let (variant, value) = match iter.next() {
|
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/de.rs:2257:22
|
2257 | Some(&Content::Seq(ref v)) => {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
2257 - Some(&Content::Seq(ref v)) => {
2257 + Some(Content::Seq(v)) => {
|
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/de.rs:2280:22
|
2280 | Some(&Content::Map(ref v)) => {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
2280 - Some(&Content::Map(ref v)) => {
2280 + Some(Content::Map(v)) => {
|
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/de.rs:2283:22
|
2283 | Some(&Content::Seq(ref v)) => {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
2283 - Some(&Content::Seq(ref v)) => {
2283 + Some(Content::Seq(v)) => {
|
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/de.rs:2406:22
|
2406 | Some(&(ref key, ref value)) => {
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
2406 - Some(&(ref key, ref value)) => {
2406 + Some((key, value)) => {
|
error: dereferencing a tuple pattern where every element takes a reference
--> serde/src/private/ser.rs:528:25
|
528 | for &(ref k, ref v) in entries {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
528 - for &(ref k, ref v) in entries {
528 + for (k, v) in entries {
|
Clippy's suggested fix is not valid in 2018 edition. The
serde_test_suite crate can't be updated to 2021 edition yet because CI
of the serde crate on old toolchains needs to be able to parse all
manifests in the workspace, even if serde_test_suite is not being
compiled in those builds.
error: variables can be used directly in the `format!` string
--> test_suite/tests/test_de.rs:2260:23
|
2260 | Err(e) => panic!("tokens failed to deserialize: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
help: change this to
|
2260 - Err(e) => panic!("tokens failed to deserialize: {}", e),
2260 + Err(e) => panic!("tokens failed to deserialize: {e}"),
|
warning: unused variable: `e`
--> test_suite/tests/test_de.rs:2260:17
|
2260 | Err(e) => panic!("tokens failed to deserialize: {e}"),
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
= note: `#[warn(unused_variables)]` on by default
warning: panic message contains an unused formatting placeholder
--> test_suite/tests/test_de.rs:2260:61
|
2260 | Err(e) => panic!("tokens failed to deserialize: {e}"),
| ^^^
|
= note: this message is not used as a format string when given without arguments, but will be in Rust 2021
= note: `#[warn(non_fmt_panics)]` on by default
help: add the missing argument
|
2260 | Err(e) => panic!("tokens failed to deserialize: {e}", ...),
| +++++
help: or add a "{}" format string to use the message literally
|
2260 | Err(e) => panic!("{}", "tokens failed to deserialize: {e}"),
| +++++
error: variables can be used directly in the `format!` string
--> test_suite/tests/test_annotations.rs:1238:30
|
1238 | serializer.serialize_str(format!("{};{:?}", f1, f2).as_str())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
help: change this to
|
1238 - serializer.serialize_str(format!("{};{:?}", f1, f2).as_str())
1238 + serializer.serialize_str(format!("{f1};{f2:?}").as_str())
|
For whatever reason, the #![cfg_attr(feature = "cargo-clippy", allow(let_underscore_drop))]
attributes already in the code stopped working in the most recent nightly (2022-09-03).
Likely in connection with https://github.com/rust-lang/rust/pull/97739 ?
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:958:13
|
958 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= note: `-D clippy::let-underscore-drop` implied by `-D clippy::pedantic`
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:992:13
|
992 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1616:9
|
1616 | let _ = deserializer;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1640:9
|
1640 | let _ = deserializer;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1651:9
|
1651 | let _ = seq;
| ^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1662:9
|
1662 | let _ = map;
| ^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/de/mod.rs:1673:9
|
1673 | let _ = data;
| ^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/private/de.rs:1440:13
|
1440 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
error: non-binding `let` on a type that implements `Drop`
--> serde/src/private/de.rs:2163:13
|
2163 | let _ = visitor;
| ^^^^^^^^^^^^^^^^
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
Bincode has been in prerelease limbo for nearly a year and the readme
does not mention anything related to Serde, so it is not serving as a
good first link to a Serde binary format.