hash_one calls hash_str #130475
Labels
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Hi folks,
I tried this code:
I expected to see this happen: same result or compilation error
Instead, this happened: got different hashes.
Meta
rustc --version --verbose
:Backtrace
Since
write_str
is not callable in stable (#96762) and the following code cannot be compiled on stable version:Final word
Overall, I'm not sure, I understand why it is implemented this way. In the end, I hash bytes and given the same bytes, I want the same hash, regardless of the type of write I do.
I do understand that some hash algorithms work differently and maybe block algorithms need a different interface, but this behavior was definitely not expected on my side.
I also do not expect stable version to call unstable flagged ones.
The text was updated successfully, but these errors were encountered: