mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
switch hashStr to use addBytes
This commit is contained in:
parent
49c3fe1643
commit
f398bb1eff
1 changed files with 1 additions and 2 deletions
|
@ -75,8 +75,7 @@ Hasher has
|
||||||
|
|
||||||
## Adds a string into a [Hasher] by hashing its UTF-8 bytes.
|
## Adds a string into a [Hasher] by hashing its UTF-8 bytes.
|
||||||
hashStrBytes = \hasher, s ->
|
hashStrBytes = \hasher, s ->
|
||||||
Str.walkUtf8WithIndex s hasher \accumHasher, byte, _ ->
|
addBytes hasher (Str.toUtf8 s)
|
||||||
addU8 accumHasher byte
|
|
||||||
|
|
||||||
## Adds a list of [Hash]able elements to a [Hasher] by hashing each element.
|
## Adds a list of [Hash]able elements to a [Hasher] by hashing each element.
|
||||||
hashList = \hasher, lst ->
|
hashList = \hasher, lst ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue