Protocol Environment: replace try ... with

This commit is contained in:
bruno 2018-06-18 17:49:38 +02:00 committed by Benjamin Canou
parent 9a8354680a
commit 1ccdea0d08

View File

@ -24,8 +24,9 @@ module Context = struct
match k, m with
| [], m -> Some m
| n :: k, Dir m -> begin
try raw_get (StringMap.find n m) k
with Not_found -> None
match StringMap.find_opt n m with
| Some res -> raw_get res k
| None -> None
end
| _ :: _, Key _ -> None