remove dead code

This commit is contained in:
Simon Cruanes 2024-04-04 16:27:06 -04:00
parent c1038e5b77
commit 7c765a181d
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 3 additions and 25 deletions

View file

@ -178,31 +178,6 @@ module Input = struct
len := !len - n
done
let append (i1 : #t) (i2 : #t) : t =
let use_i1 = ref true in
let rec input_rec (slice : Slice.t) =
if !use_i1 then (
slice.len <- input i1 slice.bytes 0 (Bytes.length slice.bytes);
if slice.len = 0 then (
use_i1 := false;
input_rec slice
)
) else
slice.len <- input i1 slice.bytes 0 (Bytes.length slice.bytes)
in
object
inherit Iostream.In_buf.t_from_refill ()
method private refill (slice : Slice.t) =
slice.off <- 0;
input_rec slice
method close () =
close i1;
close i2
end
let iter_slice (f : Slice.t -> unit) (self : #t) : unit =
let continue = ref true in
while !continue do

View file

@ -299,6 +299,9 @@ module Reader = struct
let rec read_rec (self : t) buf i len : int =
match self.state with
| Close -> 0
| Reading_frame r when r.remaining_bytes = 0 ->
self.state <- Begin;
read_rec self buf i len
| Reading_frame r ->
let len = min len r.remaining_bytes in
let n = IO.Input.input self.ic buf i len in