Skip to content

Commit fbe6675

Browse files
committed
feedback for PR #5997
1 parent f346ad6 commit fbe6675

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cardano-node/src/Cardano/Node/Tracing/Documentation.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import Ouroboros.Network.Subscription.Worker (SubscriptionTrace (..))
9595
import Ouroboros.Network.TxSubmission.Inbound (TraceTxSubmissionInbound)
9696
import Ouroboros.Network.TxSubmission.Outbound (TraceTxSubmissionOutbound)
9797

98-
import Control.Exception (SomeException, bracket)
98+
import Control.Exception (SomeException)
9999
import Control.Monad (forM_)
100100
import Data.Aeson.Types (ToJSON)
101101
import Data.Proxy (Proxy (..))
@@ -781,7 +781,5 @@ docTracersSecondPhase outputFileName mbMetricsHelpFilename trConfig bl = do
781781
doWrite f (docuResultsToMetricsHelptext bl)
782782
where
783783
doWrite outfile text =
784-
bracket
785-
(openFile outfile WriteMode)
786-
hClose
787-
(\handle -> hSetEncoding handle utf8 >> T.hPutStr handle text)
784+
withFile outfile WriteMode $ \handle ->
785+
hSetEncoding handle utf8 >> T.hPutStr handle text

0 commit comments

Comments
 (0)