File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ const PRIME: u32 = 0x1000193;
88/// Specifically this implements the [FNV-1a hash].
99///
1010/// [FNV-1a hash]: https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash
11- pub struct Hasher {
11+ pub struct FnvHasher {
1212 state : u32 ,
1313}
1414
15- impl Default for Hasher {
15+ impl Default for FnvHasher {
1616 fn default ( ) -> Self {
1717 Self { state : BASIS }
1818 }
1919}
2020
21- impl crate :: Hasher for Hasher {
21+ impl crate :: Hasher for FnvHasher {
2222 #[ inline]
2323 fn finish32 ( & self ) -> u32 {
2424 self . state
2525 }
2626}
2727
28- impl core:: hash:: Hasher for Hasher {
28+ impl core:: hash:: Hasher for FnvHasher {
2929 #[ inline]
3030 fn write ( & mut self , bytes : & [ u8 ] ) {
3131 for byte in bytes {
Original file line number Diff line number Diff line change 4848) ]
4949#![ no_std]
5050
51- pub use crate :: fnv:: Hasher as FnvHasher ;
52- pub use crate :: murmur3:: Hasher as Murmur3Hasher ;
51+ pub use crate :: fnv:: FnvHasher ;
52+ pub use crate :: murmur3:: Murmur3Hasher ;
5353
5454mod fnv;
5555mod murmur3;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use core::slice;
44use crate :: Hasher as _;
55
66/// 32-bit `MurmurHash3` hasher
7- pub struct Hasher {
7+ pub struct Murmur3Hasher {
88 buf : Buffer ,
99 index : Index ,
1010 processed : u32 ,
@@ -50,7 +50,7 @@ impl From<usize> for Index {
5050 }
5151}
5252
53- impl Hasher {
53+ impl Murmur3Hasher {
5454 /// # Safety
5555 ///
5656 /// The caller must ensure that `self.index.usize() + buf.len() <= 4`.
@@ -72,7 +72,7 @@ impl Hasher {
7272 }
7373}
7474
75- impl Default for Hasher {
75+ impl Default for Murmur3Hasher {
7676 fn default ( ) -> Self {
7777 Self {
7878 buf : Buffer {
@@ -85,7 +85,7 @@ impl Default for Hasher {
8585 }
8686}
8787
88- impl crate :: Hasher for Hasher {
88+ impl crate :: Hasher for Murmur3Hasher {
8989 fn finish32 ( & self ) -> u32 {
9090 // tail
9191 let mut state = match self . index {
@@ -128,7 +128,7 @@ impl crate::Hasher for Hasher {
128128 }
129129}
130130
131- impl core:: hash:: Hasher for Hasher {
131+ impl core:: hash:: Hasher for Murmur3Hasher {
132132 #[ inline]
133133 fn write ( & mut self , bytes : & [ u8 ] ) {
134134 let len = bytes. len ( ) ;
You can’t perform that action at this time.
0 commit comments