From a1ca8ff83180e5e11cadcd47120b22db5e07f45e Mon Sep 17 00:00:00 2001 From: carm Date: Thu, 19 Feb 2015 23:10:19 -0500 Subject: [PATCH] formatting --- src/data/CCRingBuffer.ml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/data/CCRingBuffer.ml b/src/data/CCRingBuffer.ml index 7bc90e94..fe064467 100644 --- a/src/data/CCRingBuffer.ml +++ b/src/data/CCRingBuffer.ml @@ -29,10 +29,10 @@ module Array = struct type t val empty : t - - val make: int -> elt -> t - - val length: t -> int + + val make: int -> elt -> t + + val length: t -> int val get: t -> int -> elt @@ -41,13 +41,13 @@ module Array = struct val sub: t -> int -> int -> t val copy : t -> t - - val blit : t -> int -> t -> int -> int -> unit + + val blit : t -> int -> t -> int -> int -> unit val iter : (elt -> unit) -> t -> unit end - module ByteArray : + module ByteArray : S with type elt = char and type t = bytes = struct type elt = char include Bytes @@ -203,13 +203,13 @@ struct let copy b = { b with buf=Array.copy b.buf; } - (*$T - let b = ByteBuffer.create 3 in \ - let s = Bytes.of_string "hello world" in \ - ByteBuffer.blit_from b s 0 (Bytes.length s); \ +(*$T + let b = ByteBuffer.create 3 in \ + let s = Bytes.of_string "hello world" in \ + ByteBuffer.blit_from b s 0 (Bytes.length s); \ let b' = ByteBuffer.copy b in \ try ByteBuffer.iteri b (fun i c -> if ByteBuffer.get_front b' i <> c then raise Exit); true with Exit -> false - *) +*) let capacity b = Array.length b.buf @@ -362,7 +362,7 @@ struct (*$Q (Q.pair Q.printable_string Q.printable_string) (fun (s,s') -> \ (let b = ByteBuffer.create 24 in ByteBuffer.blit_from b s 0 (Bytes.length s); - ByteBuffer.blit_from b s' 0 (Bytes.length s'); \ + ByteBuffer.blit_from b s' 0 (Bytes.length s'); \ ByteBuffer.blit_from b "hello world" 0 (Bytes.length "hello word"); (* big enough *) \ let l = ByteBuffer.length b in let l' = l/2 in ByteBuffer.skip b l'; \ ByteBuffer.length b + l' = l))