diff options
author | Robert Hensing <robert@roberthensing.nl> | 2020-10-22 13:41:28 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2020-10-22 13:46:47 +0200 |
commit | 4d4682c2b6b1697236662495166b457abfb523cf (patch) | |
tree | f6d43ab7279fdf288eef0c5d2fdd60479466464e /lib/options.nix | |
parent | 002750572a39758aabf552e90b4d0ce65092ba58 (diff) |
lib/options.nix: Use head instead of elemAt _ 0
Diffstat (limited to 'lib/options.nix')
-rw-r--r-- | lib/options.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/options.nix b/lib/options.nix index 5b7482c80937a..9e0ea010bda71 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -110,7 +110,7 @@ rec { # Return early if we only have one element # This also makes it work for functions, because the foldl' below would try # to compare the first element with itself, which is false for functions - else if length defs == 1 then (elemAt defs 0).value + else if length defs == 1 then (head defs).value else (foldl' (first: def: if def.value != first.value then throw "The option `${showOption loc}' has conflicting definition values:${showDefs [ first def ]}" |