Unverified Commit d225695e authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

lib.systems.equals: optimize removeFunctions (#506578)

parents 29273ceb 878a3872
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -43,7 +43,9 @@ let
  */
  equals =
    let
      removeFunctions = a: filterAttrs (_: v: !isFunction v) a;
      # perf: avoid lib.isFunction because system attrs are never __functor-style attrsets.
      removeFunctions =
        a: removeAttrs a (builtins.filter (n: builtins.isFunction a.${n}) (builtins.attrNames a));
    in
    a: b: removeFunctions a == removeFunctions b;