Containers for the most part do not have any trait requirements for
iterating over them. So these bounds are unnecessary when Serializing
only.
This relaxation is part of Rust 1.34
GitHub's default timeout is 6 hours. Recently some of my GitHub Actions
jobs have started randomly stalling for that long, which is inconvenient
because it ties up a chunk of my runner quota. It apepars to be very
rare for a job to recover after stalling. It's better to time out
quicker and retry on a different runner.
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 {
|
serde:🇩🇪:format::Buf is a private type, so this makes it explicit by
declaring the type `pub(super)`. In addition, it marks the function
`Buf::as_str` as unsafe, which lets us document the callsites with
`// Safety: ...` comments to explain why it is safe to use.
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())
|