summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eval/value.rs4
-rw-r--r--src/util/mod.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs
index 53db169c..e0f03d27 100644
--- a/src/eval/value.rs
+++ b/src/eval/value.rs
@@ -5,7 +5,7 @@ use std::hash::{Hash, Hasher};
use std::sync::Arc;
use ecow::eco_format;
-use siphasher::sip128::{Hasher128, SipHasher};
+use siphasher::sip128::{Hasher128, SipHasher13};
use super::{
cast_to_value, format_str, ops, Args, Array, Cast, CastInfo, Content, Dict, Func,
@@ -313,7 +313,7 @@ where
fn hash128(&self) -> u128 {
// Also hash the TypeId since values with different types but
// equal data should be different.
- let mut state = SipHasher::new();
+ let mut state = SipHasher13::new();
self.type_id().hash(&mut state);
self.hash(&mut state);
state.finish128().as_u128()
diff --git a/src/util/mod.rs b/src/util/mod.rs
index c2b23273..b8bf90d2 100644
--- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -12,7 +12,7 @@ use std::num::NonZeroUsize;
use std::path::{Component, Path, PathBuf};
use std::sync::Arc;
-use siphasher::sip128::{Hasher128, SipHasher};
+use siphasher::sip128::{Hasher128, SipHasher13};
/// Turn a closure into a struct implementing [`Debug`].
pub fn debug<F>(f: F) -> impl Debug
@@ -35,7 +35,7 @@ where
/// Calculate a 128-bit siphash of a value.
pub fn hash128<T: Hash + ?Sized>(value: &T) -> u128 {
- let mut state = SipHasher::new();
+ let mut state = SipHasher13::new();
value.hash(&mut state);
state.finish128().as_u128()
}