Skip to content

Commit

Permalink
Remove unnecessary intermediate assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Sep 16, 2020
1 parent 80ab2a4 commit b70d90e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/core/src/Cardano/Pool/DB/Model.hs
Expand Up @@ -386,10 +386,8 @@ mRollbackTo ti point = do
$ Map.mapMaybeWithKey $ discardBy id . view #slotNo . fst
modify #retirements
$ Map.mapMaybeWithKey $ discardBy id . view #slotNo . fst
poolIds <-
Set.fromList <$> mListRegisteredPools
modify #owners
$ flip Map.restrictKeys poolIds
. flip Map.restrictKeys . Set.fromList =<< mListRegisteredPools
where
discardBy :: Ord point => (SlotNo -> point) -> point -> a -> Maybe a
discardBy getPoint point' v
Expand Down

0 comments on commit b70d90e

Please sign in to comment.