diff options
author | Joe Crayne <joe@jerkface.net> | 2018-09-09 17:21:56 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-09-21 18:18:58 -0400 |
commit | 44553e7598cfea314f95d3380ea47dd4c688ba90 (patch) | |
tree | 66d1c9b88d6b087171864fc32f314506f6d87a70 /Presence/Util.hs | |
parent | 240338c4e45b7bde90ee78f7f82a35c4a43438f9 (diff) |
Handle converting empty bytestring to Text.
Diffstat (limited to 'Presence/Util.hs')
-rw-r--r-- | Presence/Util.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Presence/Util.hs b/Presence/Util.hs index a934cad7..a6e5b35f 100644 --- a/Presence/Util.hs +++ b/Presence/Util.hs | |||
@@ -44,7 +44,7 @@ textToLazyByteString :: Text -> L.ByteString | |||
44 | textToLazyByteString s = L.fromChunks [Text.encodeUtf8 s] | 44 | textToLazyByteString s = L.fromChunks [Text.encodeUtf8 s] |
45 | 45 | ||
46 | lazyByteStringToText :: L.ByteString -> Text | 46 | lazyByteStringToText :: L.ByteString -> Text |
47 | lazyByteStringToText = (foldr1 (<>) . map Text.decodeUtf8 . L.toChunks) | 47 | lazyByteStringToText = (foldr (<>) mempty . map Text.decodeUtf8 . L.toChunks) |
48 | 48 | ||
49 | -- | for example: 2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net | 49 | -- | for example: 2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net |
50 | ip6literal :: Text -> Text | 50 | ip6literal :: Text -> Text |