Skip to content
Merged
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 src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::any::{Any, TypeId};
use std::cell::RefCell;
use std::collections::HashMap;

use siphasher::sip128::{Hasher128, SipHasher};
use siphasher::sip128::{Hasher128, SipHasher13};

use crate::constraint::Join;
use crate::input::Input;
Expand All @@ -23,7 +23,7 @@ where
CACHE.with(|cache| {
// Compute the hash of the input's key part.
let key = {
let mut state = SipHasher::new();
let mut state = SipHasher13::new();
input.key(&mut state);
let hash = state.finish128().as_u128();
(id, hash)
Expand Down
4 changes: 2 additions & 2 deletions src/constraint.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::cell::RefCell;
use std::hash::Hash;

use siphasher::sip128::{Hasher128, SipHasher};
use siphasher::sip128::{Hasher128, SipHasher13};

use crate::track::Trackable;

Expand Down Expand Up @@ -121,7 +121,7 @@ where
/// Produce a 128-bit hash of a value.
#[inline]
pub fn hash<T: Hash>(value: &T) -> u128 {
let mut state = SipHasher::new();
let mut state = SipHasher13::new();
value.hash(&mut state);
state.finish128().as_u128()
}
Expand Down
4 changes: 2 additions & 2 deletions src/prehashed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::fmt::{self, Debug, Formatter};
use std::hash::{Hash, Hasher};
use std::ops::Deref;

use siphasher::sip128::{Hasher128, SipHasher};
use siphasher::sip128::{Hasher128, SipHasher13};

/// A wrapper type with precomputed hash.
///
Expand Down Expand Up @@ -62,7 +62,7 @@ impl<T: Hash + 'static> Prehashed<T> {
fn hash<T: Hash + 'static>(item: &T) -> u128 {
// Also hash the TypeId because the type might be converted
// through an unsized coercion.
let mut state = SipHasher::new();
let mut state = SipHasher13::new();
item.type_id().hash(&mut state);
item.hash(&mut state);
state.finish128().as_u128()
Expand Down