From 19aed83caebcae1103e0c4f6e200744492f17545 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 24 Apr 2020 15:17:37 +0200 Subject: Use Hashtbl.find_opt. Replace the pattern `try Some (Hashtbl.find ...) with Not_found -> None` by a call to the function Hashtbl.find_opt. --- tools/modorder.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/modorder.ml b/tools/modorder.ml index d1203568..7ca6a9e9 100644 --- a/tools/modorder.ml +++ b/tools/modorder.ml @@ -84,7 +84,7 @@ let filename_suffix s = let emit_dependencies deps targets = let rec dsort target suff = - match (try Some(Hashtbl.find deps target) with Not_found -> None) with + match Hashtbl.find_opt deps target with | None -> () | Some node -> match node.status with -- cgit