diff --git a/src/external_trait_impls/serde.rs b/src/external_trait_impls/serde.rs index 0a76dbec2..f9eb05fd7 100644 --- a/src/external_trait_impls/serde.rs +++ b/src/external_trait_impls/serde.rs @@ -186,7 +186,7 @@ mod set { where A: Allocator; - impl<'a, 'de, T, S, A> Visitor<'de> for SeqInPlaceVisitor<'a, T, S, A> + impl<'de, T, S, A> Visitor<'de> for SeqInPlaceVisitor<'_, T, S, A> where T: Deserialize<'de> + Eq + Hash, S: BuildHasher + Default, diff --git a/src/map.rs b/src/map.rs index c373d5958..7c19a4c57 100644 --- a/src/map.rs +++ b/src/map.rs @@ -4,7 +4,7 @@ use crate::raw::{ use crate::{DefaultHashBuilder, Equivalent, TryReserveError}; use core::borrow::Borrow; use core::fmt::{self, Debug}; -use core::hash::{BuildHasher, Hash}; +use core::hash::{BuildHasher, Hash, Hasher}; use core::iter::FusedIterator; use core::marker::PhantomData; use core::mem; @@ -255,7 +255,10 @@ where Q: Hash + ?Sized, S: BuildHasher, { - hash_builder.hash_one(val) + // FIXME: use `hash_one` when MSRV >= 1.71.0 + let mut hasher = hash_builder.build_hasher(); + val.hash(&mut hasher); + hasher.finish() } #[cfg(feature = "default-hasher")]