aboutsummaryrefslogtreecommitdiff
path: root/clib
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-01-30 00:26:24 +0100
committerGaëtan Gilbert2020-01-30 00:26:24 +0100
commitfbe455330a8353738c2b47bc9c00eca18054989e (patch)
tree3b67c8e9ffcfb7043f059b55314b60b9d9b876c7 /clib
parent8c04d108e1f57d0e8e11483a7c9de721ab2f026a (diff)
Remove unused CEphemeron.iter_opt, cleanup comments
Diffstat (limited to 'clib')
-rw-r--r--clib/cEphemeron.ml4
-rw-r--r--clib/cEphemeron.mli6
2 files changed, 3 insertions, 7 deletions
diff --git a/clib/cEphemeron.ml b/clib/cEphemeron.ml
index a2a6933e36..78aa8266e4 100644
--- a/clib/cEphemeron.ml
+++ b/clib/cEphemeron.ml
@@ -103,8 +103,4 @@ let default (typ, boxkey) default =
try (EHashtbl.find values boxkey).get typ
with Not_found -> default
-let iter_opt (typ, boxkey) f =
- try f ((EHashtbl.find values boxkey).get typ)
- with Not_found -> ()
-
let clean () = EHashtbl.clean values
diff --git a/clib/cEphemeron.mli b/clib/cEphemeron.mli
index 4c10a3d66f..e567e9b2c5 100644
--- a/clib/cEphemeron.mli
+++ b/clib/cEphemeron.mli
@@ -43,12 +43,12 @@ type 'a key
val create : 'a -> 'a key
-(* May raise InvalidKey *)
exception InvalidKey
+
val get : 'a key -> 'a
+(** May raise InvalidKey *)
-(* These never fail. *)
val default : 'a key -> 'a -> 'a
-val iter_opt : 'a key -> ('a -> unit) -> unit
+(** Never fails. *)
val clean : unit -> unit