lib/types: Remove unreachable if branch
The type's check function already ensured that it can't be passed non-lists
This commit is contained in:
parent
366a677dbb
commit
2ff7c3e2e1
|
@ -299,7 +299,6 @@ rec {
|
||||||
check = isList;
|
check = isList;
|
||||||
merge = loc: defs:
|
merge = loc: defs:
|
||||||
map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
|
map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
|
||||||
if isList def.value then
|
|
||||||
imap1 (m: def':
|
imap1 (m: def':
|
||||||
(mergeDefinitions
|
(mergeDefinitions
|
||||||
(loc ++ ["[definition ${toString n}-entry ${toString m}]"])
|
(loc ++ ["[definition ${toString n}-entry ${toString m}]"])
|
||||||
|
@ -307,8 +306,7 @@ rec {
|
||||||
[{ inherit (def) file; value = def'; }]
|
[{ inherit (def) file; value = def'; }]
|
||||||
).optionalValue
|
).optionalValue
|
||||||
) def.value
|
) def.value
|
||||||
else
|
) defs)));
|
||||||
throw "The option value `${showOption loc}` in `${def.file}` is not a list.") defs)));
|
|
||||||
emptyValue = { value = {}; };
|
emptyValue = { value = {}; };
|
||||||
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
|
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
|
||||||
getSubModules = elemType.getSubModules;
|
getSubModules = elemType.getSubModules;
|
||||||
|
|
Loading…
Reference in New Issue