about summary refs log tree commit diff
path: root/lib/deprecated
diff options
context:
space:
mode:
authorIvan Trubach2024-07-19 11:31:24 +0300
committerIvan Trubach2024-07-19 11:39:27 +0300
commita13e0a12b7b4bf28ff15ac4cb79fd4b16e0bf217 (patch)
tree5fe6f005bfacd5a6f8c4e7948f76766427b1decd /lib/deprecated
parent39ac682f102d4c4bb6440ce2f6c9ffb88d930d8e (diff)
lib/deprecated: alias mapAttrsFlatten to mapAttrsToList
These functions have identical implementation except for argument names.
Diffstat (limited to 'lib/deprecated')
-rw-r--r--lib/deprecated/misc.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/deprecated/misc.nix b/lib/deprecated/misc.nix
index d556bccbec0b..0209dba43406 100644
--- a/lib/deprecated/misc.nix
+++ b/lib/deprecated/misc.nix
@@ -31,7 +31,7 @@ let
     toList
     ;
 
-  inherit (lib.attrsets) removeAttrs;
+  inherit (lib.attrsets) removeAttrs mapAttrsToList;
 
   # returns default if env var is not set
   maybeEnv = name: default:
@@ -212,7 +212,8 @@ let
     else closePropagationSlow;
 
   # calls a function (f attr value ) for each record item. returns a list
-  mapAttrsFlatten = f: r: map (attr: f attr r.${attr}) (attrNames r);
+  # Renamed to lib.attrsets.mapAttrsToList.
+  mapAttrsFlatten = mapAttrsToList;
 
   # attribute set containing one attribute
   nvs = name: value: listToAttrs [ (nameValuePair name value) ];