From 1467fed572b6dc18fe3d456fb1dd386f2629c1d6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Jul 2024 17:21:41 -0400 Subject: [PATCH] fix build with old text Don't need decodeUtf8Lenient here because B64.encode surely always generates utf8. So decodeUtf8 is safe, it will never throw an exception. --- P2P/Http/Types.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P2P/Http/Types.hs b/P2P/Http/Types.hs index 0471d07e24..b7f7ce4807 100644 --- a/P2P/Http/Types.hs +++ b/P2P/Http/Types.hs @@ -73,7 +73,7 @@ encodeB64Text b = case TE.decodeUtf8' b of | otherwise -> t Left _ -> b64wrapped where - b64wrapped = TE.decodeUtf8Lenient $ "[" <> B64.encode b <> "]" + b64wrapped = TE.decodeUtf8 $ "[" <> B64.encode b <> "]" openbracket = fromIntegral (ord '[') closebracket = fromIntegral (ord ']') -- 2.30.2