From e1c1bd00e3fd735720b652b7389f33da71ee3150 Mon Sep 17 00:00:00 2001 From: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Date: Sat, 25 Jan 2025 05:27:00 +0000 Subject: [PATCH 1/4] Fix minimum dependency versions and features and check them in CI --- .github/workflows/ci.yaml | 38 +++++++++++++++++++++++++++++++++++++- Cargo.toml | 26 ++++++++++++++------------ 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 950a5f0ca..be2846fc8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,19 +12,55 @@ on: - cron: '0 0 * * 0' jobs: + lock: + name: Cargo.lock + runs-on: ubuntu-latest + steps: + - name: Checkout the Repository + uses: actions/checkout@v3 + - name: Install the Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + override: true + - name: Generate the minimum version lockfile + run: | + cargo update -Z minimal-versions + cargo update -Z direct-minimal-versions + mv Cargo.lock Cargo.lock.min + - name: Generate the current version lockfile + run: cargo update + - name: Upload the Cargo lockfiles + uses: actions/upload-artifact@v4 + with: + name: Cargo.lock + path: | + Cargo.lock + Cargo.lock.min + tests: name: Tests runs-on: ubuntu-latest + needs: lock strategy: matrix: rust: [1.64.0, stable, nightly] + lock: ["Cargo.lock", "Cargo.lock.min"] steps: - uses: actions/checkout@v3 + - name: Download the Cargo lockfiles + uses: actions/download-artifact@v4 + with: + name: Cargo.lock + - name: Rename ${{ matrix.lock }} to Cargo.lock + run: mv ${{ matrix.lock }} Cargo.lock + if: ${{ matrix.lock != 'Cargo.lock' }} - uses: ./.github/actions/setup with: - key: test-${{ matrix.rust }} + key: test-${{ matrix.rust }}-${{ matrix.lock }} - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} diff --git a/Cargo.toml b/Cargo.toml index a28a9889b..95bea9286 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,21 +25,23 @@ integer128 = [] [dependencies] # FIXME @juntyr remove base64 once old byte strings are fully deprecated -base64 = "0.22" -bitflags = { version = "2.0", features = ["serde"] } -indexmap = { version = "2.0", features = ["serde"], optional = true } +base64 = { version = "0.22", default-features = false, features = ["std"] } +bitflags = { version = "2.1", default-features = false, features = ["serde"] } +indexmap = { version = "2.0", default-features = false, features = ["std", "serde"], optional = true } # serde supports i128/u128 from 1.0.60 onwards -serde = "1.0.60" -serde_derive = "1.0" -unicode-ident = "1.0" +# serde's IntoDeserializer impls suport new constructor from 1.0.139 onwards +# serde's adjacently tagged enums support integer tags from 1.0.181 onwards +serde = { version = "1.0.181", default-features = false, features = ["std"] } +serde_derive = { version = "1.0.181", default-features = false } +unicode-ident = { version = "1.0", default-features = false } [dev-dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_bytes = "0.11" -serde_json = "1.0" -option_set = "0.2" -typetag = "0.2" -bytes = { version = "1.3", features = ["serde"] } +serde = { version = "1.0.181", default-features = false, features = ["std", "derive"] } +serde_bytes = { version = "0.11", default-features = false, features = ["std"] } +serde_json = { version = "1.0", default-features = false } +option_set = { version = "0.2", default-features = false } +typetag = { version = "0.2", default-features = false } +bytes = { version = "1.3", default-features = false, features = ["serde"] } [package.metadata.docs.rs] features = ["integer128", "indexmap"] From ae9ad95625e0f337851b9c1faf283e337b72c7b0 Mon Sep 17 00:00:00 2001 From: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Date: Sat, 25 Jan 2025 05:29:08 +0000 Subject: [PATCH 2/4] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index edb40a240..4f6ecd0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Fix issue [#556](https://github.com/ron-rs/ron/issues/556) and update minium dependency versions ([#557](https://github.com/ron-rs/ron/pull/557)) + ## [0.9.0] - 2023-09-?? ### API Changes From f1fbada52c60d4d0a927074308fb03dc7dcea717 Mon Sep 17 00:00:00 2001 From: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Date: Sat, 25 Jan 2025 05:30:13 +0000 Subject: [PATCH 3/4] Enable std feature for serde_json --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 95bea9286..a505f8faf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,8 @@ unicode-ident = { version = "1.0", default-features = false } [dev-dependencies] serde = { version = "1.0.181", default-features = false, features = ["std", "derive"] } serde_bytes = { version = "0.11", default-features = false, features = ["std"] } -serde_json = { version = "1.0", default-features = false } +# serde_json supports the std feature from 1.0.60 onwards +serde_json = { version = "1.0.60", default-features = false, features = ["std"] } option_set = { version = "0.2", default-features = false } typetag = { version = "0.2", default-features = false } bytes = { version = "1.3", default-features = false, features = ["serde"] } From 4a91db18fae20df56ca18b14c68c2feb587d7fe4 Mon Sep 17 00:00:00 2001 From: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Date: Sat, 25 Jan 2025 05:36:35 +0000 Subject: [PATCH 4/4] Auto-fix clippy lints in the fuzzer --- fuzz/fuzz_targets/bench/lib.rs | 132 ++++++++++++++++---------------- fuzz/fuzz_targets/bench/main.rs | 4 +- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/fuzz/fuzz_targets/bench/lib.rs b/fuzz/fuzz_targets/bench/lib.rs index d8ed9104d..752faecae 100644 --- a/fuzz/fuzz_targets/bench/lib.rs +++ b/fuzz/fuzz_targets/bench/lib.rs @@ -184,7 +184,7 @@ struct BorrowedTypedSerdeData<'a> { value: &'a SerdeDataValue<'a>, } -impl<'a> Serialize for TypedSerdeData<'a> { +impl Serialize for TypedSerdeData<'_> { fn serialize(&self, serializer: S) -> Result { BorrowedTypedSerdeData { ty: &self.ty, @@ -194,7 +194,7 @@ impl<'a> Serialize for TypedSerdeData<'a> { } } -impl<'a, 'de> DeserializeSeed<'de> for &TypedSerdeData<'a> { +impl<'de> DeserializeSeed<'de> for &TypedSerdeData<'_> { type Value = (); fn deserialize>(self, deserializer: D) -> Result { @@ -214,7 +214,7 @@ unsafe fn to_static_str_slice(s: &[&str]) -> &'static [&'static str] { std::mem::transmute(s) } -impl<'a> Serialize for BorrowedTypedSerdeData<'a> { +impl Serialize for BorrowedTypedSerdeData<'_> { fn serialize(&self, serializer: S) -> Result { match (self.ty, self.value) { (SerdeDataType::Unit, SerdeDataValue::Unit) => ().serialize(serializer), @@ -335,7 +335,7 @@ impl<'a> Serialize for BorrowedTypedSerdeData<'a> { map: &'a mut M, } - impl<'a, M: SerializeMap> SerializeMap for FlatMapKeyConflictDetector<'a, M> { + impl SerializeMap for FlatMapKeyConflictDetector<'_, M> { type Ok = (); type Error = M::Error; @@ -577,7 +577,7 @@ impl<'a> Serialize for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a> Serialize for UntaggedTuple<'a> { + impl Serialize for UntaggedTuple<'_> { fn serialize( &self, serializer: S, @@ -655,7 +655,7 @@ impl<'a> Serialize for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a> Serialize for UntaggedStruct<'a> { + impl Serialize for UntaggedStruct<'_> { fn serialize( &self, serializer: S, @@ -686,7 +686,7 @@ impl<'a> Serialize for BorrowedTypedSerdeData<'a> { map: &'a mut M, } - impl<'a, M: SerializeMap> SerializeMap for FlatMapKeyConflictDetector<'a, M> { + impl SerializeMap for FlatMapKeyConflictDetector<'_, M> { type Ok = (); type Error = M::Error; @@ -740,7 +740,7 @@ impl<'a> Serialize for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a> Serialize for FlattenedStructVariant<'a> { + impl Serialize for FlattenedStructVariant<'_> { fn serialize( &self, serializer: S, @@ -968,7 +968,7 @@ impl<'a> Serialize for BorrowedTypedSerdeData<'a> { } } -impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { +impl<'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'_> { type Value = (); fn deserialize>(self, deserializer: D) -> Result { @@ -1038,7 +1038,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { value: &'a str, } - impl<'a, 'de> Visitor<'de> for StringVisitor<'a> { + impl Visitor<'_> for StringVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1064,7 +1064,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { value: &'a [u8], } - impl<'a, 'de> Visitor<'de> for BytesVisitor<'a> { + impl Visitor<'_> for BytesVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1095,7 +1095,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { value: Option<&'a SerdeDataValue<'a>>, } - impl<'a, 'de> Visitor<'de> for OptionVisitor<'a> { + impl<'de> Visitor<'de> for OptionVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1182,7 +1182,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { elems: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for ArrayVisitor<'a> { + impl<'de> Visitor<'de> for ArrayVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1218,7 +1218,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for TupleVisitor<'a> { + impl<'de> Visitor<'de> for TupleVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1256,7 +1256,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { elems: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for VecVisitor<'a> { + impl<'de> Visitor<'de> for VecVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1292,7 +1292,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { elems: &'a [(SerdeDataValue<'a>, SerdeDataValue<'a>)], } - impl<'a, 'de> Visitor<'de> for MapVisitor<'a> { + impl<'de> Visitor<'de> for MapVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1332,7 +1332,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { name: &'a str, } - impl<'a, 'de> Visitor<'de> for UnitStructVisitor<'a> { + impl Visitor<'_> for UnitStructVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1356,7 +1356,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { value: &'a SerdeDataValue<'a>, } - impl<'a, 'de> Visitor<'de> for NewtypeVisitor<'a> { + impl<'de> Visitor<'de> for NewtypeVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1432,7 +1432,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for TupleStructVisitor<'a> { + impl<'de> Visitor<'de> for TupleStructVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1493,7 +1493,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { index: u64, } - impl<'a, 'de> Visitor<'de> for FieldIdentifierVisitor<'a> { + impl Visitor<'_> for FieldIdentifierVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1535,7 +1535,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'_> { type Value = (); fn deserialize>( @@ -1550,7 +1550,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { field: Option<&'a str>, } - impl<'a, 'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1680,7 +1680,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn deserialize>( @@ -1698,7 +1698,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for StructVisitor<'a> { + impl<'de> Visitor<'de> for StructVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1776,7 +1776,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for FlattenStructVisitor<'a> { + impl<'de> Visitor<'de> for FlattenStructVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1890,7 +1890,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { index: u32, } - impl<'a, 'de> Visitor<'de> for VariantIdentifierVisitor<'a> { + impl Visitor<'_> for VariantIdentifierVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1932,7 +1932,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for VariantIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for VariantIdentifierVisitor<'_> { type Value = (); fn deserialize>( @@ -1951,7 +1951,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { value: &'a SerdeDataVariantValue<'a>, } - impl<'a, 'de> Visitor<'de> for EnumVisitor<'a> { + impl<'de> Visitor<'de> for EnumVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -1993,7 +1993,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for TupleVariantVisitor<'a> { + impl<'de> Visitor<'de> for TupleVariantVisitor<'_> { type Value = (); fn expecting( @@ -2061,7 +2061,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { index: u64, } - impl<'a, 'de> Visitor<'de> for FieldIdentifierVisitor<'a> { + impl Visitor<'_> for FieldIdentifierVisitor<'_> { type Value = (); fn expecting( @@ -2118,7 +2118,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'_> { type Value = (); fn deserialize>( @@ -2138,7 +2138,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for StructVariantVisitor<'a> { + impl<'de> Visitor<'de> for StructVariantVisitor<'_> { type Value = (); fn expecting( @@ -2234,7 +2234,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { field: Option<&'a str>, } - impl<'a, 'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn expecting( @@ -2434,7 +2434,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn deserialize>( @@ -2455,7 +2455,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for FlattenStructVariantVisitor<'a> { + impl<'de> Visitor<'de> for FlattenStructVariantVisitor<'_> { type Value = (); fn expecting( @@ -2537,7 +2537,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FlattenStructVariantVisitor<'a> { + impl<'de> DeserializeSeed<'de> for FlattenStructVariantVisitor<'_> { type Value = (); fn deserialize>( @@ -2644,7 +2644,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for TupleVariantVisitor<'a> { + impl<'de> Visitor<'de> for TupleVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -2708,7 +2708,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { index: u64, } - impl<'a, 'de> Visitor<'de> for FieldIdentifierVisitor<'a> { + impl Visitor<'_> for FieldIdentifierVisitor<'_> { type Value = Option<()>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -2749,7 +2749,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'_> { type Value = Option<()>; fn deserialize>( @@ -2768,7 +2768,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for StructVariantVisitor<'a> { + impl<'de> Visitor<'de> for StructVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -2834,7 +2834,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { field: Option<&'a str>, } - impl<'a, 'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3010,7 +3010,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn deserialize>( @@ -3030,7 +3030,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for FlattenStructVariantVisitor<'a> { + impl<'de> Visitor<'de> for FlattenStructVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3149,7 +3149,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { index: u64, } - impl<'a, 'de> Visitor<'de> for FieldIdentifierVisitor<'a> { + impl Visitor<'_> for FieldIdentifierVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3191,7 +3191,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'_> { type Value = (); fn deserialize>( @@ -3253,7 +3253,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { ) -> Result { struct DelayedVariantIdentifierVisitor; - impl<'de> Visitor<'de> for DelayedVariantIdentifierVisitor { + impl Visitor<'_> for DelayedVariantIdentifierVisitor { type Value = DelayedVariantIdentifier; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3296,7 +3296,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { content: &'a str, } - impl<'a, 'de> Visitor<'de> for AdjacentlyTaggedUnitVariantVisitor<'a> { + impl<'de> Visitor<'de> for AdjacentlyTaggedUnitVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3368,7 +3368,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { content: &'a str, } - impl<'a, 'de> Visitor<'de> for AdjacentlyTaggedOtherVariantVisitor<'a> { + impl<'de> Visitor<'de> for AdjacentlyTaggedOtherVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3439,7 +3439,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { value: &'a SerdeDataValue<'a>, } - impl<'a, 'de> Visitor<'de> for AdjacentlyTaggedNewtypeVariantVisitor<'a> { + impl<'de> Visitor<'de> for AdjacentlyTaggedNewtypeVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3534,7 +3534,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for TupleVariantSeed<'a> { + impl<'de> Visitor<'de> for TupleVariantSeed<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3573,7 +3573,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for TupleVariantSeed<'a> { + impl<'de> DeserializeSeed<'de> for TupleVariantSeed<'_> { type Value = (); fn deserialize>( @@ -3594,7 +3594,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for AdjacentlyTaggedTupleVariantVisitor<'a> { + impl<'de> Visitor<'de> for AdjacentlyTaggedTupleVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3700,7 +3700,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for StructVariantSeed<'a> { + impl<'de> Visitor<'de> for StructVariantSeed<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3748,7 +3748,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for StructVariantSeed<'a> { + impl<'de> DeserializeSeed<'de> for StructVariantSeed<'_> { type Value = (); fn deserialize>( @@ -3767,7 +3767,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { field: Option<&'a str>, } - impl<'a, 'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -3939,7 +3939,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn deserialize>( @@ -3959,7 +3959,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for FlattenStructVariantSeed<'a> { + impl<'de> Visitor<'de> for FlattenStructVariantSeed<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -4037,7 +4037,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FlattenStructVariantSeed<'a> { + impl<'de> DeserializeSeed<'de> for FlattenStructVariantSeed<'_> { type Value = (); fn deserialize>( @@ -4060,7 +4060,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for AdjacentlyTaggedStructVariantVisitor<'a> { + impl<'de> Visitor<'de> for AdjacentlyTaggedStructVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -4284,7 +4284,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { ) -> Result { struct DelayedVariantIdentifierVisitor; - impl<'de> Visitor<'de> for DelayedVariantIdentifierVisitor { + impl Visitor<'_> for DelayedVariantIdentifierVisitor { type Value = DelayedVariantIdentifier; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -4372,7 +4372,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { index: u64, } - impl<'a, 'de> Visitor<'de> for FieldIdentifierVisitor<'a> { + impl Visitor<'_> for FieldIdentifierVisitor<'_> { type Value = Option<()>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -4413,7 +4413,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for FieldIdentifierVisitor<'_> { type Value = Option<()>; fn deserialize>( @@ -4432,7 +4432,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for StructVariantVisitor<'a> { + impl<'de> Visitor<'de> for StructVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -4526,7 +4526,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { field: Option<&'a str>, } - impl<'a, 'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> Visitor<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -4702,7 +4702,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { } } - impl<'a, 'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'a> { + impl<'de> DeserializeSeed<'de> for MaybeFlattenFieldIdentifierVisitor<'_> { type Value = Option>; fn deserialize>( @@ -4722,7 +4722,7 @@ impl<'a, 'de> DeserializeSeed<'de> for BorrowedTypedSerdeData<'a> { values: &'a [SerdeDataValue<'a>], } - impl<'a, 'de> Visitor<'de> for FlattenStructVariantVisitor<'a> { + impl<'de> Visitor<'de> for FlattenStructVariantVisitor<'_> { type Value = (); fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/fuzz/fuzz_targets/bench/main.rs b/fuzz/fuzz_targets/bench/main.rs index bdbbe374c..a4fdb2bcf 100644 --- a/fuzz/fuzz_targets/bench/main.rs +++ b/fuzz/fuzz_targets/bench/main.rs @@ -112,10 +112,10 @@ fn main() -> anyhow::Result<()> { println!("{ron}"); println!("{:=^80}", ""); - criterion.bench_function(&format!("{:?}", entry), |b| { + criterion.bench_function(&format!("{entry:?}"), |b| { b.iter(|| { black_box(typed_data::roundtrip_arbitrary_typed_ron_or_panic(&data)); - }) + }); }); }