Skip to content

Commit

Permalink
Merge pull request #235197 from hercules-ci/simplify-concatMapAttrs-t…
Browse files Browse the repository at this point in the history
…race

lib.concatMapAttrs: Simplify stack trace
  • Loading branch information
roberth authored May 31, 2023
2 parents 58bf1f8 + 5319ddf commit 9772ecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/attrsets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ rec {
{ x = "a"; y = "b"; }
=> { x = "a"; xa = "a"; y = "b"; yb = "b"; }
*/
concatMapAttrs = f: flip pipe [ (mapAttrs f) attrValues (foldl' mergeAttrs { }) ];
concatMapAttrs = f: v:
foldl' mergeAttrs { }
(attrValues
(mapAttrs f v)
);


/* Update or set specific paths of an attribute set.
Expand Down

0 comments on commit 9772ecb

Please sign in to comment.