move files to src folder (to allow testing) (#70)

This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2021-07-05 20:05:07 +01:00
1 parent 58889be83d
commit 85727bfbf1
13 files changed
+35 -41

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
module Simplex.Chat.Util where
import Data.ByteString.Char8 (ByteString)
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8With)
safeDecodeUtf8 :: ByteString -> Text
safeDecodeUtf8 = decodeUtf8With onError
where
onError _ _ = Just '?'