Implement with_hasher adaptors#1007
Conversation
jswrenn
left a comment
There was a problem hiding this comment.
One small nit, but otherwise this LGTM.
|
Two nits:
@jswrenn Feel free to proceed as you deem appropriate. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1007 +/- ##
==========================================
- Coverage 94.38% 94.02% -0.37%
==========================================
Files 48 51 +3
Lines 6665 6631 -34
==========================================
- Hits 6291 6235 -56
- Misses 374 396 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
It would be a breaking change for Rust to change its default hasher, so we're fine to rely on |
|
@424ever Are you planning to continue with this PR? |
Sorry for the late reply. Yes, I'll rebase this and clean it up a bit |
194357b to
987ca42
Compare
|
Do I need to do something about the failing semver checks? Those aren't in any files this PR touches. |
|
@phimuemue @jswrenn Can we get this in for 0.15? |
The semver check failure is informational, and expected because there are changes to the public API. |
Yeah, sure! :) |
|
Hi! Unfortunately my graphics card died today so I probably can't respond to requests changes for at least a few days. |
|
@phimuemue @jswrenn Do you have any outstanding review comments? |
There was a problem hiding this comment.
@jswrenn tldr; I suggest we take this as is. Could you have a look and merge it?
@424ever Thanks for this. Looks clean and relatively straightforward. Please don't push additional changes on top of eba2678 - I'd like to avoid re-reviewing.
Once this is merged, we may come back and fine-tune:
- Documentation could be more uniform.
- "Delegating" functions could be more uniform.
GroupingMapcould go withoutS, and have a_with_hashervariant for each function.- Tests check the interface, but not that the passed hasher is actually used inside.
- Something that automagically detects presence of
_with_hasher-variant and compares it against its ordinary counterpart would be nice, but is hard to come up with.
Closes #998
Implementations for the following methods: