mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
reformat…
This commit is contained in:
parent
c50798bf96
commit
4c2a9f1602
3 changed files with 15 additions and 17 deletions
|
|
@ -149,7 +149,7 @@ let () =
|
||||||
Printf.printf "pi=%.6f (pi=%.6f, diff=%.3f)%s\n%!" res Float.pi
|
Printf.printf "pi=%.6f (pi=%.6f, diff=%.3f)%s\n%!" res Float.pi
|
||||||
(abs_float (Float.pi -. res))
|
(abs_float (Float.pi -. res))
|
||||||
(if !time then
|
(if !time then
|
||||||
spf " in %.4fs" elapsed
|
spf " in %.4fs" elapsed
|
||||||
else
|
else
|
||||||
"");
|
"");
|
||||||
()
|
()
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
open Common_
|
open Common_
|
||||||
|
|
||||||
class type t =
|
class type t = object
|
||||||
object
|
method input : bytes -> int -> int -> int
|
||||||
method input : bytes -> int -> int -> int
|
(** Read into the slice. Returns [0] only if the
|
||||||
(** Read into the slice. Returns [0] only if the
|
|
||||||
stream is closed. *)
|
stream is closed. *)
|
||||||
|
|
||||||
method close : unit -> unit
|
method close : unit -> unit
|
||||||
(** Close the input. Must be idempotent. *)
|
(** Close the input. Must be idempotent. *)
|
||||||
end
|
end
|
||||||
|
|
||||||
let create ?(close = ignore) ~input () : t =
|
let create ?(close = ignore) ~input () : t =
|
||||||
object
|
object
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
open Common_
|
open Common_
|
||||||
|
|
||||||
class type t =
|
class type t = object
|
||||||
object
|
method output_char : char -> unit
|
||||||
method output_char : char -> unit
|
method output : bytes -> int -> int -> unit
|
||||||
method output : bytes -> int -> int -> unit
|
method flush : unit -> unit
|
||||||
method flush : unit -> unit
|
method close : unit -> unit
|
||||||
method close : unit -> unit
|
end
|
||||||
end
|
|
||||||
|
|
||||||
let create ?(flush = ignore) ?(close = ignore) ~output_char ~output () : t =
|
let create ?(flush = ignore) ?(close = ignore) ~output_char ~output () : t =
|
||||||
object
|
object
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue