From 64db927d734bf69f79b869cd3928ab12fb291ad8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 29 Dec 2023 10:51:05 -0400 Subject: [PATCH] optimisation --- Command/Info.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Command/Info.hs b/Command/Info.hs index 3027572945..864ad02579 100644 --- a/Command/Info.hs +++ b/Command/Info.hs @@ -627,10 +627,11 @@ cachedAllRepoData = do Nothing -> do matcher <- lift getKeyOnlyMatcher !v <- lift $ overLocationLogs emptyKeyInfo $ \k locs d -> do - numcopies <- genericLength . snd - <$> trustPartition DeadTrusted locs ifM (matchOnKey matcher k) - ( return (addKeyCopies numcopies k d) + ( do + numcopies <- genericLength . snd + <$> trustPartition DeadTrusted locs + return (addKeyCopies numcopies k d) , return d ) put s { allRepoData = Just v }