fxhash icon indicating copy to clipboard operation
fxhash copied to clipboard

change default hash value for FxHasher32

Open httaotao opened this issue 3 years ago • 0 comments

hello, we find out a bug , there has som code in lib.rs

impl Default for FxHasher32 {
    #[inline]
    fn default() -> FxHasher32 {
        FxHasher32 { hash: 0 }
    }
}

When we set zero into FxHasher32, the value is also zero. However, the normal value should be not zero.

then when we change the default value

impl Default for FxHasher32 {
    #[inline]
    fn default() -> FxHasher32 {
        FxHasher32 { hash: 41 }
    }
}

it's ok.

httaotao avatar Feb 16 '22 09:02 httaotao