use xxhash_rust::xxh3::xxh3_64;
#[must_use]
pub fn content_hash(data: &[u8]) -> u64 {
xxh3_64(data)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_content_hash() {
let data = b"hello world";
let hash = content_hash(data);
assert_ne!(hash, 0);
assert_eq!(hash, content_hash(data));
assert_ne!(hash, content_hash(b"hello world!"));
}
}