aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/hash.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/hash.lux')
-rw-r--r--stdlib/source/program/aedifex/hash.lux6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index 4506720a1..eedf5e464 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -60,7 +60,7 @@
(Format Binary)
(binary.mix (function (_ byte representation)
(let [hex (at n.hex encoded byte)
- hex (case (text.size hex)
+ hex (when (text.size hex)
1 (format "0" hex)
_ hex)]
(format representation hex)))
@@ -128,7 +128,7 @@
chunk 0
output (binary.empty hash_size)])
(let [index (n.* chunk i64.bytes_per_i64)]
- (case (text.split_at ..hex_per_chunk input)
+ (when (text.split_at ..hex_per_chunk input)
{.#Some [head tail]}
(do try.monad
[head (at n.hex decoded head)
@@ -136,7 +136,7 @@
(again tail (++ chunk) output))
{.#None}
- (case (..hash_size input)
+ (when (..hash_size input)
0 (constructor output)
(^.with_template [<size> <write>]
[<size>