From dd16d43a35d19360351c4228ce71146650e27f08 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Sat, 6 Jun 2026 02:36:02 -0400 Subject: [PATCH] lib.attrsets.mergeAttrsList: use simpler midpoint function --- lib/attrsets.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 932b66b9cfb6..059efe2a372a 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -1615,7 +1615,7 @@ rec { if end - start >= 2 then # If there's at least 2 elements, split the range in two, recurse on each part and merge the result # The invariant is satisfied because each half will have at least 1 element - binaryMerge start (start + (end - start) / 2) // binaryMerge (start + (end - start) / 2) end + binaryMerge start ((start + end) / 2) // binaryMerge ((start + end) / 2) end else # Otherwise there will be exactly 1 element due to the invariant, in which case we just return it directly elemAt list start;