mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
test bytestring with ahash
This commit is contained in:
parent
5285656bdc
commit
147c4f4f2c
@ -24,4 +24,4 @@ serde = { version = "1.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1.0"
|
||||
siphasher = "0.3"
|
||||
ahash = { version = "0.6", default-features = false }
|
||||
|
@ -224,7 +224,7 @@ mod test {
|
||||
use alloc::borrow::ToOwned;
|
||||
use core::hash::{Hash, Hasher};
|
||||
|
||||
use siphasher::sip::SipHasher;
|
||||
use ahash::AHasher;
|
||||
|
||||
use super::*;
|
||||
|
||||
@ -243,10 +243,10 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_hash() {
|
||||
let mut hasher1 = SipHasher::default();
|
||||
let mut hasher1 = AHasher::default();
|
||||
"str".hash(&mut hasher1);
|
||||
|
||||
let mut hasher2 = SipHasher::default();
|
||||
let mut hasher2 = AHasher::default();
|
||||
let s = ByteString::from_static("str");
|
||||
s.hash(&mut hasher2);
|
||||
assert_eq!(hasher1.finish(), hasher2.finish());
|
||||
|
Loading…
Reference in New Issue
Block a user