From a82e783f15b3b893bb064c500d7436dbefbc5c11 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 10 Jul 2018 16:41:54 +0700 Subject: [PATCH] re-arrange short match to go to the top Signed-off-by: Rudi Grinberg --- src/super_context.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/super_context.ml b/src/super_context.ml index 164920c8..ed8aa288 100644 --- a/src/super_context.ml +++ b/src/super_context.ml @@ -420,6 +420,7 @@ end = struct let rec get t ~dir = match Hashtbl.find t.env dir with + | Some node -> node | None -> begin match Path.parent dir with | None -> raise_notrace Exit @@ -428,7 +429,6 @@ end = struct Hashtbl.add t.env dir node; node end - | Some node -> node let get t ~dir = match get t ~dir with