From de1be63d37f197425ba349cc2d260e23d2f14f2f Mon Sep 17 00:00:00 2001 From: Anders429 Date: Sun, 19 Nov 2023 11:43:15 -0800 Subject: [PATCH 1/4] Upgrade hashbrown dependency to 0.14.2. --- CHANGELOG.md | 3 +++ Cargo.toml | 6 +++--- README.md | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2a9251..ebcfe1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## Unreleased +### Changed +- Increased version of `hashbrown` dependency to `0.14.2`. +- Raised MSRV to `1.64.0`. ## 0.5.0 - 2023-05-16 ### Added diff --git a/Cargo.toml b/Cargo.toml index a13159d..728a055 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "serde_assert" version = "0.5.0" authors = ["Anders Evensen"] edition = "2021" -rust-version = "1.61.0" +rust-version = "1.64.0" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/Anders429/serde_assert" @@ -12,7 +12,7 @@ categories = ["development-tools::testing", "encoding", "no-std"] keywords = ["serde", "testing", "serialization", "deserialization", "test"] [dependencies] -hashbrown = "0.13.2" +hashbrown = {version = "0.14.2", default-features = false, features = ["ahash"]} serde = {version = "1.0.152", default-features = false, features = ["alloc"]} [build-dependencies] @@ -20,6 +20,6 @@ serde = {version = "1.0.152", default-features = false} [dev-dependencies] claims = "0.7.1" -hashbrown = {version = "0.13.2", features = ["serde"]} +hashbrown = {version = "0.14.2", default-features = false, features = ["ahash", "serde"]} serde_bytes = "0.11.8" serde_derive = "1.0.152" diff --git a/README.md b/README.md index 24e67cc..62b5f06 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ While some users may find that the smaller API of `serde_test` is sufficient for - Sophisticated comparison of serialized [`Tokens`](https://docs.rs/serde_assert/latest/serde_assert/struct.Tokens.html), including allowing testing of types whose serialized form can include items in arbitrary order, such as when serializing a [`HashSet`](https://docs.rs/hashbrown/latest/hashbrown/struct.HashSet.html). ## Minimum Supported Rust Version -This crate is guaranteed to compile on stable `rustc 1.61.0` and up. +This crate is guaranteed to compile on stable `rustc 1.64.0` and up. ## License This project is licensed under either of From 5f777271e1f8e760adf18a9d93daa2d4037c18a0 Mon Sep 17 00:00:00 2001 From: Anders429 Date: Sun, 19 Nov 2023 11:49:27 -0800 Subject: [PATCH 2/4] Add documentation about builder panicking. --- src/de.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/de.rs b/src/de.rs index e942177..09272a2 100644 --- a/src/de.rs +++ b/src/de.rs @@ -1332,6 +1332,9 @@ impl Builder { /// .is_human_readable(false) /// .build(); /// ``` + /// + /// # Panics + /// This method will panic if [`Builder::tokens()`] was never called. pub fn build<'a>(&mut self) -> Deserializer<'a> { Deserializer { tokens: token::Iter::new( From b495ef347dd93889ce6c8964adf8d594b50de8f0 Mon Sep 17 00:00:00 2001 From: Anders429 Date: Sun, 19 Nov 2023 11:51:03 -0800 Subject: [PATCH 3/4] Make loop over tokens more concise. --- src/token.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.rs b/src/token.rs index e94ca47..7d01c8e 100644 --- a/src/token.rs +++ b/src/token.rs @@ -1042,7 +1042,7 @@ impl PartialEq for Token { } let mut consumed = HashSet::new(); - 'outer: for tokens in tokens_a.iter() { + 'outer: for tokens in *tokens_a { for (i, other_tokens) in tokens_b .iter() .enumerate() From a9b495427d0b625ae802ed93e5e9c1c95601b96a Mon Sep 17 00:00:00 2001 From: Anders429 Date: Sun, 19 Nov 2023 11:54:10 -0800 Subject: [PATCH 4/4] Correct MSRV to 1.63 and fix MSRV badge. --- .github/workflows/test.yaml | 4 ++-- Cargo.toml | 2 +- README.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2bbce4b..b8f8425 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ jobs: strategy: matrix: rust: - - 1.61.0 + - 1.63.0 - stable - beta - nightly @@ -33,7 +33,7 @@ jobs: strategy: matrix: rust: - - 1.61.0 + - 1.63.0 - stable - beta - nightly diff --git a/Cargo.toml b/Cargo.toml index 728a055..8ecb260 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "serde_assert" version = "0.5.0" authors = ["Anders Evensen"] edition = "2021" -rust-version = "1.64.0" +rust-version = "1.63.0" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/Anders429/serde_assert" diff --git a/README.md b/README.md index 62b5f06..3cf1f4a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![codecov.io](https://img.shields.io/codecov/c/gh/Anders429/serde_assert)](https://codecov.io/gh/Anders429/serde_assert) [![crates.io](https://img.shields.io/crates/v/serde_assert)](https://crates.io/crates/serde_assert) [![docs.rs](https://docs.rs/serde_assert/badge.svg)](https://docs.rs/serde_assert) -[![MSRV](https://img.shields.io/badge/rustc-1.61.0+-yellow.svg)](#minimum-supported-rust-version) +[![MSRV](https://img.shields.io/badge/rustc-1.63.0+-yellow.svg)](#minimum-supported-rust-version) [![License](https://img.shields.io/crates/l/serde_assert)](#license) Testing library for [`serde`](https://crates.io/crates/serde) [`Serialize`](https://docs.rs/serde/1.0.152/serde/trait.Serialize.html) and [`Deserialize`](https://docs.rs/serde/1.0.152/serde/trait.Deserialize.html) implementations. @@ -60,7 +60,7 @@ While some users may find that the smaller API of `serde_test` is sufficient for - Sophisticated comparison of serialized [`Tokens`](https://docs.rs/serde_assert/latest/serde_assert/struct.Tokens.html), including allowing testing of types whose serialized form can include items in arbitrary order, such as when serializing a [`HashSet`](https://docs.rs/hashbrown/latest/hashbrown/struct.HashSet.html). ## Minimum Supported Rust Version -This crate is guaranteed to compile on stable `rustc 1.64.0` and up. +This crate is guaranteed to compile on stable `rustc 1.63.0` and up. ## License This project is licensed under either of