From a14d683d0136daaae66b3da7c0526f3e18d169c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ru=CC=81nar?= Date: Tue, 19 Dec 2023 20:08:23 +0000 Subject: [PATCH] Replace broken fromBase16 with non-broken version --- lib/unison-util-bytes/src/Unison/Util/Bytes.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/unison-util-bytes/src/Unison/Util/Bytes.hs b/lib/unison-util-bytes/src/Unison/Util/Bytes.hs index 27abe8893e..7d4981b89b 100644 --- a/lib/unison-util-bytes/src/Unison/Util/Bytes.hs +++ b/lib/unison-util-bytes/src/Unison/Util/Bytes.hs @@ -370,13 +370,7 @@ arrayToChunk bs = case BA.convert bs :: Block Word8 of chunkFromArray = arrayToChunk fromBase16 :: Bytes -> Either Text.Text Bytes -fromBase16 bs = case traverse convert (chunks bs) of - Left e -> Left (Text.pack e) - Right bs -> Right (fromChunks bs) - where - convert b = - BE.convertFromBase BE.Base16 (chunkToArray @BA.Bytes b) - <&> arrayToChunk @BA.Bytes +fromBase16 = fromBase BE.Base16 toBase32, toBase64, toBase64UrlUnpadded :: Bytes -> Bytes toBase32 = toBase BE.Base32