Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 22, 2020

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Dec 22, 2020
@pull pull bot added the merge-conflict Resolve conflicts manually label Oct 2, 2021
fix: Correct spelling error
Handle Unexpected::Unit in Error::invalid_value
Format f64 in error messages using ryu
Add swap_remove and shift_remove methods on Map
    warning: method `is_sign_negative` is never used
       --> src/lexical/num.rs:251:8
        |
    175 | pub trait Float: Number {
        |           ----- method in this trait
    ...
    251 |     fn is_sign_negative(self) -> bool;
        |        ^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default
rust-lang/rust-clippy#12257

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2500:25
         |
    2500 |         assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
         |                         ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
         = note: `-W clippy::incompatible-msrv` implied by `-W clippy::all`
         = help: to override `-W clippy::all` add `#[allow(clippy::incompatible_msrv)]`

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2500:44
         |
    2500 |         assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
         |                                            ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2503:25
         |
    2503 |         assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
         |                         ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2503:44
         |
    2503 |         assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
         |                                            ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
rust-lang/rust#117772

    warning: the item `String` is imported redundantly
       --> src/de.rs:8:5
        |
    8   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here
        |
        = note: `#[warn(unused_imports)]` on by default

    warning: the item `Vec` is imported redundantly
       --> src/de.rs:9:5
        |
    9   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `Box` is imported redundantly
       --> src/error.rs:4:5
        |
    4   | use alloc::boxed::Box;
        |     ^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Box` is already defined here

    warning: the item `String` is imported redundantly
       --> src/error.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/error.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `String` is imported redundantly
       --> src/map.rs:10:5
        |
    10  | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `indexmap` is imported redundantly
      --> src/map.rs:23:16
       |
    23 | use indexmap::{self, IndexMap};
       |                ^^^^ the item `indexmap` is already defined here
       |
       = note: `#[warn(unused_imports)]` on by default

    warning: the item `String` is imported redundantly
       --> src/ser.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/ser.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/ser.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/mod.rs:95:5
        |
    95  | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/mod.rs:96:5
        |
    96  | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `ToOwned` is imported redundantly
       --> src/value/de.rs:5:26
        |
    5   | use alloc::borrow::{Cow, ToOwned};
        |                          ^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToOwned` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/de.rs:6:5
        |
    6   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/de.rs:9:24
        |
    9   | use alloc::vec::{self, Vec};
        |                        ^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/from.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/value/from.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/from.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `ToOwned` is imported redundantly
       --> src/value/index.rs:3:5
        |
    3   | use alloc::borrow::ToOwned;
        |     ^^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToOwned` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/index.rs:4:5
        |
    4   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/partial_eq.rs:2:5
        |
    2   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToOwned` is imported redundantly
       --> src/value/ser.rs:4:5
        |
    4   | use alloc::borrow::ToOwned;
        |     ^^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToOwned` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/ser.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/value/ser.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/ser.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/read.rs:2:5
        |
    2   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `ToString` is imported redundantly
       --> tests/test.rs:46:5
        |
    46  | use std::string::ToString;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here
        |
        = note: `#[warn(unused_imports)]` on by default

    warning: the item `Vec` is imported redundantly
       --> tests/../src/lexical/bignum.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here
        |
        = note: `#[warn(unused_imports)]` on by default
dtolnay and others added 13 commits February 19, 2024 16:12
rust-lang/rust#121621

    warning: non-local `impl` definition, they should be avoided as they go against expectation
        --> tests/test.rs:2338:5
         |
    2338 | /     impl<'de> Deserialize<'de> for &'de RawMapKey {
    2339 | |         fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    2340 | |         where
    2341 | |             D: serde::Deserializer<'de>,
    ...    |
    2345 | |         }
    2346 | |     }
         | |_____^
         |
         = help: move this `impl` block outside the of the current function `test_raw_value_in_map_key`
         = note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
         = note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
         = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <rust-lang/rust#120363>
         = note: `#[warn(non_local_definitions)]` on by default
Remove conditional on repr(transparent)
New in nightly-2024-03-24 from rust-lang/rust#119552.

    warning: field `x` is never read
      --> tests/regression/issue795.rs:11:15
       |
    11 |     Variant { x: u8 },
       |     -------   ^
       |     |
       |     field in this variant
       |
       = note: `#[warn(dead_code)]` on by default

    warning: field `i` is never read
      --> tests/regression/issue845.rs:63:9
       |
    61 | pub struct Struct {
       |            ------ field in this struct
    62 |     #[serde(deserialize_with = "deserialize_integer_or_string")]
    63 |     pub i: i64,
       |         ^
       |
       = note: `Struct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
This was leading to rustdocs markdown parser to interpret slices like &[u8] as
& and a link to u8
Debugging a recent cargo-outdated bug, it would have been nice not to
wonder whether a rustc version change in GitHub's runner image was a
contributing factor.
Fix missing backtick in doc comments letting markdown think &[u8] is a link to u8
    warning: usage of a legacy numeric method
       --> src/de.rs:484:73
        |
    484 | ...                   if overflow!(significand * 10 + digit, u64::max_value()) {
        |                                                                   ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
        = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
    help: use the associated constant instead
        |
    484 |                             if overflow!(significand * 10 + digit, u64::MAX) {
        |                                                                         ~~~

    warning: usage of a legacy numeric method
       --> src/de.rs:536:57
        |
    536 |             if overflow!(significand * 10 + digit, u64::max_value()) {
        |                                                         ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    536 |             if overflow!(significand * 10 + digit, u64::MAX) {
        |                                                         ~~~

    warning: usage of a legacy numeric method
       --> src/de.rs:600:49
        |
    600 |             if overflow!(exp * 10 + digit, i32::max_value()) {
        |                                                 ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    600 |             if overflow!(exp * 10 + digit, i32::MAX) {
        |                                                 ~~~

    warning: usage of a legacy numeric method
       --> src/number.rs:100:39
        |
    100 |             N::PosInt(v) => v <= i64::max_value() as u64,
        |                                       ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    100 |             N::PosInt(v) => v <= i64::MAX as u64,
        |                                       ~~~

    warning: usage of a legacy numeric method
       --> src/number.rs:192:30
        |
    192 |                 if n <= i64::max_value() as u64 {
        |                              ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    192 |                 if n <= i64::MAX as u64 {
        |                              ~~~

    warning: usage of a legacy numeric method
      --> tests/../src/lexical/exponent.rs:11:21
       |
    11 |     if value > i32::max_value() as usize {
       |                     ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
       = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
    help: use the associated constant instead
       |
    11 |     if value > i32::MAX as usize {
       |                     ~~~

    warning: usage of a legacy numeric method
      --> tests/../src/lexical/exponent.rs:12:14
       |
    12 |         i32::max_value()
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    12 |         i32::MAX
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/../src/lexical/rounding.rs:28:14
       |
    28 |         u64::max_value()
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    28 |         u64::MAX
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:21:34
       |
    21 |         scientific_exponent(i32::min_value(), 0, 0),
       |                                  ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    21 |         scientific_exponent(i32::MIN, 0, 0),
       |                                  ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:22:14
       |
    22 |         i32::min_value()
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    22 |         i32::MIN
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:25:34
       |
    25 |         scientific_exponent(i32::min_value(), 0, 5),
       |                                  ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    25 |         scientific_exponent(i32::MIN, 0, 5),
       |                                  ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:26:14
       |
    26 |         i32::min_value()
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    26 |         i32::MIN
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:31:34
       |
    31 |         scientific_exponent(i32::max_value(), 0, 0),
       |                                  ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    31 |         scientific_exponent(i32::MAX, 0, 0),
       |                                  ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:32:14
       |
    32 |         i32::max_value() - 1
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    32 |         i32::MAX - 1
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:35:34
       |
    35 |         scientific_exponent(i32::max_value(), 5, 0),
       |                                  ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    35 |         scientific_exponent(i32::MAX, 5, 0),
       |                                  ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:36:14
       |
    36 |         i32::max_value()
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    36 |         i32::MAX
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:45:32
       |
    45 |         mantissa_exponent(i32::max_value(), 5, 0),
       |                                ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    45 |         mantissa_exponent(i32::MAX, 5, 0),
       |                                ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:46:14
       |
    46 |         i32::max_value() - 5
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    46 |         i32::MAX - 5
       |              ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:48:39
       |
    48 |     assert_eq!(mantissa_exponent(i32::max_value(), 0, 5), i32::max_value());
       |                                       ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    48 |     assert_eq!(mantissa_exponent(i32::MAX, 0, 5), i32::max_value());
       |                                       ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:48:64
       |
    48 |     assert_eq!(mantissa_exponent(i32::max_value(), 0, 5), i32::max_value());
       |                                                                ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    48 |     assert_eq!(mantissa_exponent(i32::max_value(), 0, 5), i32::MAX);
       |                                                                ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:49:39
       |
    49 |     assert_eq!(mantissa_exponent(i32::min_value(), 5, 0), i32::min_value());
       |                                       ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    49 |     assert_eq!(mantissa_exponent(i32::MIN, 5, 0), i32::min_value());
       |                                       ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:49:64
       |
    49 |     assert_eq!(mantissa_exponent(i32::min_value(), 5, 0), i32::min_value());
       |                                                                ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    49 |     assert_eq!(mantissa_exponent(i32::min_value(), 5, 0), i32::MIN);
       |                                                                ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:51:32
       |
    51 |         mantissa_exponent(i32::min_value(), 0, 5),
       |                                ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    51 |         mantissa_exponent(i32::MIN, 0, 5),
       |                                ~~~

    warning: usage of a legacy numeric method
      --> tests/lexical/exponent.rs:52:14
       |
    52 |         i32::min_value() + 5
       |              ^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
       |
    52 |         i32::MIN + 5
       |              ~~~

    warning: importing legacy numeric constants
      --> tests/test.rs:47:11
       |
    47 | use std::{i16, i32, i64, i8};
       |           ^^^
       |
       = help: remove this import
       = note: then `i16::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
       = note: `#[warn(clippy::legacy_numeric_constants)]` on by default

    warning: importing legacy numeric constants
      --> tests/test.rs:47:16
       |
    47 | use std::{i16, i32, i64, i8};
       |                ^^^
       |
       = help: remove this import
       = note: then `i32::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: importing legacy numeric constants
      --> tests/test.rs:47:21
       |
    47 | use std::{i16, i32, i64, i8};
       |                     ^^^
       |
       = help: remove this import
       = note: then `i64::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: importing legacy numeric constants
      --> tests/test.rs:47:26
       |
    47 | use std::{i16, i32, i64, i8};
       |                          ^^
       |
       = help: remove this import
       = note: then `i8::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: importing legacy numeric constants
      --> tests/test.rs:48:11
       |
    48 | use std::{u16, u32, u64, u8};
       |           ^^^
       |
       = help: remove this import
       = note: then `u16::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: importing legacy numeric constants
      --> tests/test.rs:48:16
       |
    48 | use std::{u16, u32, u64, u8};
       |                ^^^
       |
       = help: remove this import
       = note: then `u32::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: importing legacy numeric constants
      --> tests/test.rs:48:21
       |
    48 | use std::{u16, u32, u64, u8};
       |                     ^^^
       |
       = help: remove this import
       = note: then `u64::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: importing legacy numeric constants
      --> tests/test.rs:48:26
       |
    48 | use std::{u16, u32, u64, u8};
       |                          ^^
       |
       = help: remove this import
       = note: then `u8::<CONST>` will resolve to the respective associated constant
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

    warning: usage of a legacy numeric constant
       --> tests/test.rs:161:22
        |
    161 |     let v = to_value(::std::f64::NAN.copysign(1.0)).unwrap();
        |                      ^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    161 |     let v = to_value(f64::NAN.copysign(1.0)).unwrap();
        |                      ~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:164:22
        |
    164 |     let v = to_value(::std::f64::NAN.copysign(-1.0)).unwrap();
        |                      ^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    164 |     let v = to_value(f64::NAN.copysign(-1.0)).unwrap();
        |                      ~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:167:22
        |
    167 |     let v = to_value(::std::f64::INFINITY).unwrap();
        |                      ^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    167 |     let v = to_value(f64::INFINITY).unwrap();
        |                      ~~~~~~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:170:23
        |
    170 |     let v = to_value(-::std::f64::INFINITY).unwrap();
        |                       ^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    170 |     let v = to_value(-f64::INFINITY).unwrap();
        |                       ~~~~~~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:173:22
        |
    173 |     let v = to_value(::std::f32::NAN.copysign(1.0)).unwrap();
        |                      ^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    173 |     let v = to_value(f32::NAN.copysign(1.0)).unwrap();
        |                      ~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:176:22
        |
    176 |     let v = to_value(::std::f32::NAN.copysign(-1.0)).unwrap();
        |                      ^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    176 |     let v = to_value(f32::NAN.copysign(-1.0)).unwrap();
        |                      ~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:179:22
        |
    179 |     let v = to_value(::std::f32::INFINITY).unwrap();
        |                      ^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    179 |     let v = to_value(f32::INFINITY).unwrap();
        |                      ~~~~~~~~~~~~~

    warning: usage of a legacy numeric constant
       --> tests/test.rs:182:23
        |
    182 |     let v = to_value(-::std::f32::INFINITY).unwrap();
        |                       ^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    182 |     let v = to_value(-f32::INFINITY).unwrap();
        |                       ~~~~~~~~~~~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2243:26
         |
    2243 |     let signed = &[i128::min_value(), -1, 0, 1, i128::max_value()];
         |                          ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2243 |     let signed = &[i128::MIN, -1, 0, 1, i128::max_value()];
         |                          ~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2243:55
         |
    2243 |     let signed = &[i128::min_value(), -1, 0, 1, i128::max_value()];
         |                                                       ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2243 |     let signed = &[i128::min_value(), -1, 0, 1, i128::MAX];
         |                                                       ~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2244:34
         |
    2244 |     let unsigned = &[0, 1, u128::max_value()];
         |                                  ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2244 |     let unsigned = &[0, 1, u128::MAX];
         |                                  ~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2280:36
         |
    2280 |     let signed = &[i128::from(i64::min_value()), i128::from(u64::max_value())];
         |                                    ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2280 |     let signed = &[i128::from(i64::MIN), i128::from(u64::max_value())];
         |                                    ~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2280:66
         |
    2280 |     let signed = &[i128::from(i64::min_value()), i128::from(u64::max_value())];
         |                                                                  ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2280 |     let signed = &[i128::from(i64::min_value()), i128::from(u64::MAX)];
         |                                                                  ~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2281:41
         |
    2281 |     let unsigned = &[0, u128::from(u64::max_value())];
         |                                         ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2281 |     let unsigned = &[0, u128::from(u64::MAX)];
         |                                         ~~~

    warning: usage of a legacy numeric method
        --> tests/test.rs:2294:44
         |
    2294 |         let err = to_value(u128::from(u64::max_value()) + 1).unwrap_err();
         |                                            ^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
         |
    2294 |         let err = to_value(u128::from(u64::MAX) + 1).unwrap_err();
         |                                            ~~~
SOF3 and others added 30 commits July 6, 2025 21:49
…ndtrip EscapeChar to the u8 without actually branching
string serialization escaping optimisations
feat: impl Default for &Value
Implement Default for CompactFormatter
Add Clone and Debug impls to map iterators
Older versions produce slightly differently normalized output
when run against 1.90.0+ Rust compiler.
Raise required compiler to Rust 1.61
Switch serde dependency to serde_core
    warning: variables can be used directly in the `format!` string
       --> src/ser.rs:448:15
        |
    448 |         match write!(adapter, "{}", value) {
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
        = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
    help: change this to
        |
    448 -         match write!(adapter, "{}", value) {
    448 +         match write!(adapter, "{value}") {
        |

    warning: variables can be used directly in the `format!` string
       --> src/value/mod.rs:182:37
        |
    182 |             Value::Bool(boolean) => write!(formatter, "Bool({})", boolean),
        |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
        |
    182 -             Value::Bool(boolean) => write!(formatter, "Bool({})", boolean),
    182 +             Value::Bool(boolean) => write!(formatter, "Bool({boolean})"),
        |

    warning: variables can be used directly in the `format!` string
       --> src/value/mod.rs:184:38
        |
    184 |             Value::String(string) => write!(formatter, "String({:?})", string),
        |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
        |
    184 -             Value::String(string) => write!(formatter, "String({:?})", string),
    184 +             Value::String(string) => write!(formatter, "String({string:?})"),
        |

    warning: variables can be used directly in the `format!` string
       --> src/number.rs:365:9
        |
    365 |         write!(formatter, "Number({})", self)
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
        |
    365 -         write!(formatter, "Number({})", self)
    365 +         write!(formatter, "Number({self})")
        |
Signed-off-by: claudecodering <claudecoder@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.