Skip to content

Commit a14d683

Browse files
committed
Replace broken fromBase16 with non-broken version
1 parent e690c5f commit a14d683

File tree

1 file changed

+1
-7
lines changed
  • lib/unison-util-bytes/src/Unison/Util

1 file changed

+1
-7
lines changed

lib/unison-util-bytes/src/Unison/Util/Bytes.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,7 @@ arrayToChunk bs = case BA.convert bs :: Block Word8 of
370370
chunkFromArray = arrayToChunk
371371

372372
fromBase16 :: Bytes -> Either Text.Text Bytes
373-
fromBase16 bs = case traverse convert (chunks bs) of
374-
Left e -> Left (Text.pack e)
375-
Right bs -> Right (fromChunks bs)
376-
where
377-
convert b =
378-
BE.convertFromBase BE.Base16 (chunkToArray @BA.Bytes b)
379-
<&> arrayToChunk @BA.Bytes
373+
fromBase16 = fromBase BE.Base16
380374

381375
toBase32, toBase64, toBase64UrlUnpadded :: Bytes -> Bytes
382376
toBase32 = toBase BE.Base32

0 commit comments

Comments
 (0)