From f72656173200c06b2fb02bf1c4dfd410fe45721a Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 12 Mar 2020 05:27:43 -0700 Subject: [PATCH] [biabd][minor] `unSome` is just `Option.value_exn` Summary: Easier to read that way. Reviewed By: ezgicicek Differential Revision: D20393926 fbshipit-source-id: 455716e10 --- infer/src/biabduction/Prop.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/infer/src/biabduction/Prop.ml b/infer/src/biabduction/Prop.ml index 5c96cf3ab..99316313d 100644 --- a/infer/src/biabduction/Prop.ml +++ b/infer/src/biabduction/Prop.ml @@ -18,8 +18,6 @@ module F = Format variables (C) or default values (Java). *) type struct_init_mode = No_init | Fld_init -let unSome = function Some x -> x | _ -> assert false - (** kind for normal props, i.e. normalized *) type normal @@ -2547,7 +2545,7 @@ let rec strexp_gc_fields (se : Predicates.strexp) = let fselo = List.map ~f:(fun (f, se) -> (f, strexp_gc_fields se)) fsel in let fsel' = let fselo' = List.filter ~f:(function _, Some _ -> true | _ -> false) fselo in - List.map ~f:(function f, seo -> (f, unSome seo)) fselo' + List.map ~f:(function f, seo -> (f, Option.value_exn seo)) fselo' in if [%compare.equal: (Fieldname.t * Predicates.strexp) list] fsel fsel' then Some se else Some (Predicates.Estruct (fsel', inst))