aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2020-04-24 15:17:37 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2020-06-28 10:07:02 +0200
commit19aed83caebcae1103e0c4f6e200744492f17545 (patch)
tree8d15976e55751216b0af7885e508e9878d38261f /lib
parent7fe7aabe4bac5a2250f31045797fce663ec65848 (diff)
downloadcompcert-kvx-19aed83caebcae1103e0c4f6e200744492f17545.tar.gz
compcert-kvx-19aed83caebcae1103e0c4f6e200744492f17545.zip
Use Hashtbl.find_opt.
Replace the pattern `try Some (Hashtbl.find ...) with Not_found -> None` by a call to the function Hashtbl.find_opt.
Diffstat (limited to 'lib')
-rw-r--r--lib/Readconfig.mll2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Readconfig.mll b/lib/Readconfig.mll
index 7b98255e..8abcc407 100644
--- a/lib/Readconfig.mll
+++ b/lib/Readconfig.mll
@@ -20,7 +20,7 @@
let key_val_tbl : (string, string list) Hashtbl.t = Hashtbl.create 17
let key_val key =
- try Some(Hashtbl.find key_val_tbl key) with Not_found -> None
+ Hashtbl.find_opt key_val_tbl key
(* Auxiliaries for parsing *)