From 2e23f022db3a661d37283a06c35f8d39059d63a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Wejdenst=C3=A5l?= Date: Sat, 26 Apr 2025 04:35:10 +0200 Subject: [PATCH 1/3] update edition to 2021 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ea872f4..62bfda4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "hashlink" version = "0.10.0" authors = ["kyren "] -edition = "2018" +edition = "2021" description = "HashMap-like containers that hold their key-value pairs in a user controllable order" repository = "https://github.com/kyren/hashlink" documentation = "https://docs.rs/hashlink" From 4dff04d7f0a4a3ad731abb65037df3411b4dc2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Wejdenst=C3=A5l?= Date: Sat, 26 Apr 2025 04:37:11 +0200 Subject: [PATCH 2/3] use dep: tag to tell cargo that the serde_impl feature should pull in serde as a dep --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 62bfda4..39a9d8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ rust-version = "1.65" circle-ci = { repository = "kyren/hashlink", branch = "master" } [features] -serde_impl = ["serde"] +serde_impl = ["dep:serde"] [dependencies] hashbrown = { version = "0.15", default-features = false, features = ["default-hasher", "inline-more"] } From 620059daf8021ca55e54b729c48fc0546a53eddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Wejdenst=C3=A5l?= Date: Sat, 26 Apr 2025 04:47:48 +0200 Subject: [PATCH 3/3] remove unnecessary pub visibility --- src/serde.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/serde.rs b/src/serde.rs index 57c3b16..1792655 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -20,7 +20,6 @@ where V: Serialize, S: BuildHasher, { - #[inline] fn serialize(&self, serializer: T) -> Result { let mut map_serializer = serializer.serialize_map(Some(self.len()))?; for (k, v) in self { @@ -39,7 +38,7 @@ where { fn deserialize>(deserializer: D) -> Result { #[derive(Debug)] - pub struct LinkedHashMapVisitor { + struct LinkedHashMapVisitor { marker: PhantomData>, } @@ -95,7 +94,6 @@ where T: Serialize + Eq + Hash, S: BuildHasher, { - #[inline] fn serialize(&self, serializer: U) -> Result { let mut seq_serializer = serializer.serialize_seq(Some(self.len()))?; for v in self { @@ -112,7 +110,7 @@ where { fn deserialize>(deserializer: D) -> Result { #[derive(Debug)] - pub struct LinkedHashSetVisitor { + struct LinkedHashSetVisitor { marker: PhantomData>, }