Skip to content

Commit 7e9f525

Browse files
committed
Improve hPutSerialise to use hPutBuilder (fixes #317)
1 parent e29359e commit 7e9f525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serialise/src/Codec/Serialise.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ hPutSerialise :: Serialise a
153153
=> Handle -- ^ The @'Handle'@ to write to.
154154
-> a -- ^ The value to be serialised and written.
155155
-> IO ()
156-
hPutSerialise hnd x = BS.hPut hnd (serialise x)
156+
hPutSerialise hnd x = BS.hPutBuilder hnd (CBOR.Write.toBuilder (encode x))
157157

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

0 commit comments

Comments
 (0)