diff options
| author | Pierre-Marie Pédrot | 2020-01-30 05:10:49 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-01-30 05:10:49 +0100 |
| commit | d05e061cafc543955700dcbd7fb0f15495efad13 (patch) | |
| tree | 60ca426b9f3d2f6b6c411e5fc99dd37a69f3ca8d | |
| parent | b382f790253ad5c870f5c89665175c6770b7e926 (diff) | |
| parent | fbe455330a8353738c2b47bc9c00eca18054989e (diff) | |
Merge PR #11480: Remove unused CEphemeron.iter_opt, cleanup comments
Reviewed-by: ppedrot
| -rw-r--r-- | clib/cEphemeron.ml | 4 | ||||
| -rw-r--r-- | clib/cEphemeron.mli | 6 |
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 |
