Skip to content

Commit 763f039

Browse files
committed
Lint liftPPWPError
1 parent aca3cec commit 763f039

File tree

1 file changed

+1
-3
lines changed
  • src/Simplex/Messaging/Notifications/Server/Push

1 file changed

+1
-3
lines changed

src/Simplex/Messaging/Notifications/Server/Push/WebPush.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ liftPPWPError :: IO a -> ExceptT PushProviderError IO a
6969
liftPPWPError = liftPPWPError' toPPWPError
7070

7171
liftPPWPError' :: (SomeException -> PushProviderError) -> IO a -> ExceptT PushProviderError IO a
72-
liftPPWPError' err a = do
73-
res <- liftIO $ try @SomeException a
74-
either (throwError . err) return res
72+
liftPPWPError' err a = liftIO (try @SomeException a) >>= either (throwError . err) return
7573

7674
toPPWPError :: SomeException -> PushProviderError
7775
toPPWPError e = case fromException e of

0 commit comments

Comments
 (0)