From da660be6e7c6e51fd52e8f67d29080abb9d11140 Mon Sep 17 00:00:00 2001 From: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com> Date: Tue, 21 May 2024 12:16:14 +0300 Subject: [PATCH] fix lint --- src/Simplex/Messaging/Server.hs | 2 +- src/Simplex/Messaging/Server/Stats.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Simplex/Messaging/Server.hs b/src/Simplex/Messaging/Server.hs index 868ca3c80..6ad1c0aa8 100644 --- a/src/Simplex/Messaging/Server.hs +++ b/src/Simplex/Messaging/Server.hs @@ -321,7 +321,7 @@ smpServer started cfg@ServerConfig {transports, transportConfig = tCfg} = do atomically . modifyTVar' rates' $ (rates :) . take nBuckets where collect :: IntMap CS.ClientStatsData -> CS.ClientStatsC (IntMap Int) - collect stats = IM.foldlWithKey' toColumns (CS.clientStatsC IM.empty) stats + collect = IM.foldlWithKey' toColumns (CS.clientStatsC IM.empty) where toColumns acc statsId csd = CS.ClientStatsC diff --git a/src/Simplex/Messaging/Server/Stats.hs b/src/Simplex/Messaging/Server/Stats.hs index d92c58693..758964829 100644 --- a/src/Simplex/Messaging/Server/Stats.hs +++ b/src/Simplex/Messaging/Server/Stats.hs @@ -380,8 +380,8 @@ distribution h = maximal = fst <$> listToMaybe rcdf' } where - bot p = fmap fst $ find (\(_, p') -> p' >= p) cdf' - top p = fmap fst $ find (\(_, p') -> p' <= 1 - p) rcdf' + bot p = fst <$> find (\(_, p') -> p' >= p) cdf' + top p = fst <$> find (\(_, p') -> p' <= 1 - p) rcdf' cdf' = cdf h rcdf' = reverse cdf' -- allow find to work from the smaller end