Skip to content

Specify hasher for unique? #462

Open
@camsteffen

Description

@camsteffen

Would there be interest in adding a variant of unique which allows you to specify the hasher? How about the name unique_default? The name isn't great but it's the best I can think of. It is inspired by HashMap which allows you to specify the hasher using HashMap::default().

Example:

 iter.unique_default::<BuildHasherDefault<AHasher>>();

I have implemented this on my machine but I want to get feedback before opening a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions