mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
bugfix in CCWBTree (return the correct exn)
This commit is contained in:
parent
47d5e52224
commit
1dad12868e
1 changed files with 2 additions and 2 deletions
|
|
@ -260,7 +260,7 @@ module MakeFull(K : KEY) : S with type key = K.t = struct
|
|||
|
||||
(* extract min binding of the tree *)
|
||||
let rec extract_min m = match m with
|
||||
| E -> assert false
|
||||
| E -> raise Not_found
|
||||
| N (k, v, E, r, _) -> k, v, r
|
||||
| N (k, v, l, r, _) ->
|
||||
let k', v', l' = extract_min l in
|
||||
|
|
@ -268,7 +268,7 @@ module MakeFull(K : KEY) : S with type key = K.t = struct
|
|||
|
||||
(* extract max binding of the tree *)
|
||||
let rec extract_max m = match m with
|
||||
| E -> assert false
|
||||
| E -> raise Not_found
|
||||
| N (k, v, l, E, _) -> k, v, l
|
||||
| N (k, v, l, r, _) ->
|
||||
let k', v', r' = extract_max r in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue