Skip to content

Commit 2490595

Browse files
committed
style: Use List.assoc_opt
Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
1 parent 7f96646 commit 2490595

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

ocaml/xapi/storage_migrate.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,7 @@ module MigrateLocal = struct
426426
(* Destroy the snapshot, if it still exists *)
427427
let snap =
428428
List.find_opt
429-
(fun x ->
430-
List.mem_assoc "base_mirror" x.sm_config
431-
&& List.assoc "base_mirror" x.sm_config = id
432-
)
429+
(fun x -> List.assoc_opt "base_mirror" x.sm_config = Some id)
433430
vdis
434431
in
435432
( match snap with

0 commit comments

Comments
 (0)