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 match k, m with
| [], m -> Some m | [], m -> Some m
| n :: k, Dir m -> begin | n :: k, Dir m -> begin
try raw_get (StringMap.find n m) k match StringMap.find_opt n m with
with Not_found -> None | Some res -> raw_get res k
| None -> None
end end
| _ :: _, Key _ -> None | _ :: _, Key _ -> None