From 2ebcb211da1586b40bfb1fab6651c12da67d399c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Fri, 20 Dec 2024 17:30:13 +0100 Subject: [PATCH] Use physical equality for root checking Suggested-by: art-w --- src/index-format/union_find.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index-format/union_find.ml b/src/index-format/union_find.ml index c73140113..246c14752 100644 --- a/src/index-format/union_find.ml +++ b/src/index-format/union_find.ml @@ -10,7 +10,7 @@ let rec find x = | Root _ -> x | Link ({ parent; _ } as link) -> let root = find parent in - if root <> parent then link.parent <- root; + if root != parent then link.parent <- root; root let union ~f x y =