Skip to content

Commit 68fc9cb

Browse files
author
Marcello Seri
committed
lib/channel_helper: Lwt_unix requires bytes
I was surprised that the compiler did not complain (safe-string was on) Signed-off-by: Marcello Seri <[email protected]>
1 parent 3dd51b2 commit 68fc9cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/channel_helper.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ exception End_of_file
99
exception No_useful_protocol
1010

1111
let copy_all src dst =
12-
let buffer = String.make 16384 '\000' in
12+
let buffer = Bytes.make 16384 '\000' in
1313
let rec loop () =
14-
Lwt_unix.read src buffer 0 (String.length buffer) >>= fun n ->
14+
Lwt_unix.read src buffer 0 (Bytes.length buffer) >>= fun n ->
1515
if n = 0
1616
then Lwt.fail End_of_file
1717
else

0 commit comments

Comments
 (0)