fold -> foldr (#1646)
Some checks failed
Some checks failed
This commit is contained in:
commit
e95de00a47
2 changed files with 2 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ in
|
||||||
config = mkIf (cfg.sessions != []) {
|
config = mkIf (cfg.sessions != []) {
|
||||||
|
|
||||||
launchd.daemons =
|
launchd.daemons =
|
||||||
lib.fold ( s : acc : acc //
|
lib.foldr ( s : acc : acc //
|
||||||
{
|
{
|
||||||
"autossh-${s.name}" =
|
"autossh-${s.name}" =
|
||||||
let
|
let
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ let
|
||||||
failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
||||||
|
|
||||||
throwAssertions = res: if (failedAssertions != []) then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}" else res;
|
throwAssertions = res: if (failedAssertions != []) then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}" else res;
|
||||||
showWarnings = res: fold (w: x: builtins.trace "[1;31mwarning: ${w}[0m" x) res config.warnings;
|
showWarnings = res: foldr (w: x: builtins.trace "[1;31mwarning: ${w}[0m" x) res config.warnings;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue