Skip to content

Commit

Permalink
try to fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
cospectrum committed Jan 22, 2024
1 parent 39a88f1 commit ad98773
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions memcrab-server/src/cache/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ where
idx as usize
}
fn hash<T: Hash>(&self, item: &T) -> u64 {
use core::hash::{BuildHasher, Hasher};

let mut hasher = self.hasher.build_hasher();
item.hash(&mut hasher);
hasher.finish()
use core::hash::BuildHasher;
self.hasher.hash_one(item)
}
}

0 comments on commit ad98773

Please sign in to comment.