mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
lib.modules: inline mergedType into a lower scope
This will only be used if `res ? type` (which is barely ever true, since there's typically only ever one decl). We can avoid the thunk in every case.
This commit is contained in:
@@ -1043,10 +1043,11 @@ let
|
||||
(
|
||||
res: opt:
|
||||
let
|
||||
mergedType = res.type.typeMerge opt.options.type.functor;
|
||||
|
||||
typeSet =
|
||||
if opt.options ? type && res ? type then
|
||||
let
|
||||
mergedType = res.type.typeMerge opt.options.type.functor;
|
||||
in
|
||||
if mergedType != null then
|
||||
{
|
||||
type = mergedType;
|
||||
|
||||
Reference in New Issue
Block a user