From 0e5c114f2e92b2367f37952d2f131a610199479e Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 14 Jul 2016 16:37:47 +0530 Subject: [PATCH 1/2] Add FnvHasher::with_key() --- lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib.rs b/lib.rs index e42abc7..b191f23 100644 --- a/lib.rs +++ b/lib.rs @@ -78,8 +78,16 @@ impl Default for FnvHasher { } } -impl Hasher for FnvHasher { +impl FnvHasher { + /// Create an FNV hasher starting with a state corresponding + /// to the hash `key`. + #[inline] + pub fn with_key(key: u64) -> FnvHasher { + FnvHasher(key) + } +} +impl Hasher for FnvHasher { #[inline] fn finish(&self) -> u64 { self.0 From cfd612c3e88b1f776e1f6757dbb70ddd19524f5c Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 14 Jul 2016 16:39:17 +0530 Subject: [PATCH 2/2] Bump to 1.0.4 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dbbeb2d..db37da5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fnv" -version = "1.0.3" +version = "1.0.4" authors = ["Alex Crichton "] description = "Fowler–Noll–Vo hash function" license = "Apache-2.0 / MIT"