Skip to content

Commit 6bb7627

Browse files
panglesdjonludlam
authored andcommitted
Use Odoc_utils for List.find_map compat.
1 parent e50abeb commit 6bb7627

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/odoc/bin/main.ml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -594,17 +594,11 @@ end = struct
594594
l
595595
in
596596
let o = Antichain.absolute_normalization o in
597-
(* Taken from OCaml 5.2 standard library *)
598-
let rec find_map ~f = function
599-
| [] -> None
600-
| x :: l -> (
601-
match f x with Some _ as result -> result | None -> find_map ~f l)
602-
in
603597
match l with
604598
| [] -> None
605599
| _ ->
606-
find_map
607-
~f:(fun (root, path) ->
600+
Odoc_utils.List.find_map
601+
(fun (root, path) ->
608602
if Fpath.is_prefix path o then Some root else None)
609603
l
610604

0 commit comments

Comments
 (0)