Skip to content

Commit b14eb91

Browse files
committed
make BuildHasher object safe
1 parent e610e34 commit b14eb91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/hash/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,10 @@ pub trait BuildHasher {
520520
/// );
521521
/// ```
522522
#[unstable(feature = "build_hasher_simple_hash_one", issue = "86161")]
523-
fn hash_one<T: Hash>(&self, x: T) -> u64 {
523+
fn hash_one<T: Hash>(&self, x: T) -> u64
524+
where
525+
Self: Sized,
526+
{
524527
let mut hasher = self.build_hasher();
525528
x.hash(&mut hasher);
526529
hasher.finish()

0 commit comments

Comments
 (0)