diff --git a/stdlib/buffer.ml b/stdlib/buffer.ml index 3f02df61c..39f1cc0d2 100644 --- a/stdlib/buffer.ml +++ b/stdlib/buffer.ml @@ -279,7 +279,7 @@ let to_seq b = let rec aux i () = if i >= b.position then Seq.Nil else - let x = Bytes.get b.buffer i in + let x = Bytes.unsafe_get b.buffer i in Seq.Cons (x, aux (i+1)) in aux 0 @@ -288,7 +288,7 @@ let to_seqi b = let rec aux i () = if i >= b.position then Seq.Nil else - let x = Bytes.get b.buffer i in + let x = Bytes.unsafe_get b.buffer i in Seq.Cons ((i,x), aux (i+1)) in aux 0