Currently, the errors are not sentinel, and so are hard to test for. This PR makes sure hash collision errors are accounted for.
Changes
Add ErrBadHash. Happens when there are too many collisions for an item to be added.
Design Decisions
Chose to name ErrBadHash over ErrCycle because the feedbach that the user should be given is to evaluate their hash functions. Cycle collision is a bit esoteric.
Checklist
Tests pass
Docs updated
## Description
Currently, the errors are not sentinel, and so are hard to test for. This PR makes sure hash collision errors are accounted for.
## Changes
- Add `ErrBadHash`. Happens when there are too many collisions for an item to be added.
### Design Decisions
- Chose to name `ErrBadHash` over `ErrCycle` because the feedbach that the user should be given is to evaluate their hash functions. Cycle collision is a bit esoteric.
## Checklist
- [x] Tests pass
- [x] Docs updated
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Currently, the errors are not sentinel, and so are hard to test for. This PR makes sure hash collision errors are accounted for.
Changes
ErrBadHash. Happens when there are too many collisions for an item to be added.Design Decisions
ErrBadHashoverErrCyclebecause the feedbach that the user should be given is to evaluate their hash functions. Cycle collision is a bit esoteric.Checklist