Eliminate some optionals/optionalAttrs calls on the hot path

This commit is contained in:
Eelco Dolstra
2014-10-05 01:59:24 +02:00
parent 97220c973f
commit ce61353a9f
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -80,9 +80,9 @@ rec {
internal = opt.internal or false;
visible = opt.visible or true;
}
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }
// optionalAttrs (opt ? defaultText) { default = opt.defaultText; };
// (if opt ? example then { example = scrubOptionValue opt.example; } else {})
// (if opt ? default then { default = scrubOptionValue opt.default; } else {})
// (if opt ? defaultText then { default = opt.defaultText; } else {});
subOptions =
let ss = opt.type.getSubOptions opt.loc;