add missing spaces

This commit is contained in:
Joey Hess 2024-06-12 13:06:14 -04:00
parent 44464e4410
commit 5b668f9ef1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -56,12 +56,16 @@ recordProxies proxies = do
. parseProxyLog
buildProxyList :: S.Set Proxy -> Builder
buildProxyList = mconcat . map fmt . S.toList
buildProxyList = assemble . map fmt . S.toList
where
fmt p = buildUUID (proxyRemoteUUID p)
<> colon
<> byteString (encodeBS (proxyRemoteName p))
colon = charUtf8 ':'
assemble [] = mempty
assemble (x:[]) = x
assemble (x:y:l) = x <> " " <> assemble (y:l)
parseProxyLog :: L.ByteString -> Log (S.Set Proxy)
parseProxyLog = parseLogNew parseProxyList