Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "hashlink"
version = "0.10.0"
authors = ["kyren <[email protected]>"]
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"
Expand All @@ -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"] }
Expand Down
6 changes: 2 additions & 4 deletions src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ where
V: Serialize,
S: BuildHasher,
{
#[inline]
fn serialize<T: Serializer>(&self, serializer: T) -> Result<T::Ok, T::Error> {
let mut map_serializer = serializer.serialize_map(Some(self.len()))?;
for (k, v) in self {
Expand All @@ -39,7 +38,7 @@ where
{
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
#[derive(Debug)]
pub struct LinkedHashMapVisitor<K, V, S> {
struct LinkedHashMapVisitor<K, V, S> {
marker: PhantomData<LinkedHashMap<K, V, S>>,
}

Expand Down Expand Up @@ -95,7 +94,6 @@ where
T: Serialize + Eq + Hash,
S: BuildHasher,
{
#[inline]
fn serialize<U: Serializer>(&self, serializer: U) -> Result<U::Ok, U::Error> {
let mut seq_serializer = serializer.serialize_seq(Some(self.len()))?;
for v in self {
Expand All @@ -112,7 +110,7 @@ where
{
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
#[derive(Debug)]
pub struct LinkedHashSetVisitor<T, S> {
struct LinkedHashSetVisitor<T, S> {
marker: PhantomData<LinkedHashSet<T, S>>,
}

Expand Down