diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-13 14:19:31 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-13 15:15:16 -0400 |
commit | c0a483632c3e0193678dd58c994528d88d42ea00 (patch) | |
tree | 794673d20c185d9c77c5222ec1f506417dfaa90a /pkgs/lib/types.nix | |
parent | 431c55cbf1f99748cb28566a33d15fb22bf76fe6 (diff) | |
download | nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.tar nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.tar.gz nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.tar.bz2 nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.tar.lz nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.tar.xz nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.tar.zst nixpkgs-c0a483632c3e0193678dd58c994528d88d42ea00.zip |
Eliminate some calls to ‘tail’
Diffstat (limited to 'pkgs/lib/types.nix')
-rw-r--r-- | pkgs/lib/types.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix index 956368138aa..38ae7b43630 100644 --- a/pkgs/lib/types.nix +++ b/pkgs/lib/types.nix @@ -157,7 +157,7 @@ rec { uniq = elemType: mkOptionType { inherit (elemType) name check iter fold docPath hasOptions; merge = list: - if tail list == [] then + if length list == 1 then head list else throw "Multiple definitions. Only one is allowed for this option."; |