File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ let serve_zeroes server : unit =
44 H. add_route_handler server H. (Route. (exact " zeroes" @/ int @/ return))
55 @@ fun n _req ->
66 (* stream [n] zeroes *)
7- let write (oc : H.IO.Out_channel .t ) : unit =
7+ let write (oc : H.IO.Output .t ) : unit =
88 let buf = Bytes. make 1 '0' in
99 for _i = 1 to n do
10- H.IO.Out_channel . output oc buf 0 1
10+ H.IO.Output . output oc buf 0 1
1111 done
1212 in
1313 let writer = H.IO.Writer. make ~write () in
@@ -24,7 +24,7 @@ let serve_file server : unit =
2424 Fun. protect ~finally: (fun () -> close_in_noerr ic) @@ fun () ->
2525 while
2626 let n = input ic buf 0 (Bytes. length buf) in
27- if n > 0 then H.IO.Out_channel . output oc buf 0 n;
27+ if n > 0 then H.IO.Output . output oc buf 0 n;
2828 n > 0
2929 do
3030 ()
You can’t perform that action at this time.
0 commit comments