Skip to content

Commit

Permalink
Improve hPutSerialise to use hPutBuilder (fixes #317)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgundry committed Aug 18, 2023
1 parent 4149849 commit ba334b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serialise/src/Codec/Serialise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ hPutSerialise :: Serialise a
=> Handle -- ^ The @'Handle'@ to write to.
-> a -- ^ The value to be serialised and written.
-> IO ()
hPutSerialise hnd x = BS.hPut hnd (serialise x)
hPutSerialise hnd x = BS.hPutBuilder hnd (CBOR.Write.toBuilder (encode x))

-- | Serialise a @'BS.ByteString'@ and write it directly to the
-- specified file.
Expand Down

0 comments on commit ba334b8

Please sign in to comment.