Skip to content

change default hash value for FxHasher32 #17

@httaotao

Description

@httaotao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions