Skip to content

Commit

Permalink
Avoid wildcard
Browse files Browse the repository at this point in the history
This ensures we'll break and be intentional if the constructors change
in the future.
  • Loading branch information
pbrisbin committed Jul 24, 2024
1 parent 5cba9c1 commit 528e5d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Blammo-wai/src/Network/Wai/Middleware/Logging.hs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ requestLoggerWith config env app req respond =
getTime = Clock.getTime Clock.Monotonic
toMillis x = fromIntegral (Clock.toNanoSecs x) / nsPerMs
isRaw = \case
ResponseFile {} -> False
ResponseBuilder {} -> False
ResponseStream {} -> False
ResponseRaw {} -> True
_ -> False

logRawResponse :: MonadLogger m => Config -> Double -> Request -> m ()
logRawResponse config@Config {..} duration req =
Expand Down

0 comments on commit 528e5d7

Please sign in to comment.