From f083b6a2cdb5ed3052eb500680c65b95c7ead3a6 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 8 Feb 2018 11:58:40 +0800 Subject: [PATCH] Get rid of useless find_internal' function It was only used to define find_internal --- src/lib_db.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib_db.ml b/src/lib_db.ml index b73296a8..d3cec8af 100644 --- a/src/lib_db.ml +++ b/src/lib_db.ml @@ -62,17 +62,14 @@ module Scope = struct | exception (Findlib.Findlib _) -> None | x -> Some x - let find_internal' t name = - match String_map.find name t.scope.libs with + let find_internal (t : t With_required_by.t) name = + match String_map.find name t.data.scope.libs with | Some _ as some -> some | None -> - match Hashtbl.find t.lib_db.by_public_name name with + match Hashtbl.find t.data.lib_db.by_public_name name with | Some (Internal x) -> Some x | _ -> None - let find_internal (t : t With_required_by.t) name = - find_internal' t.data name - let lib_is_available (t : t With_required_by.t) name = match find_internal t name with | Some (_, lib) -> String_map.mem lib.name t.data.lib_db.instalable_internal_libs