mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide: use boolean comparison to simplify the code base
This commit is contained in:
parent
5066c71549
commit
e908e344f4
18 changed files with 29 additions and 64 deletions
|
@ -73,11 +73,8 @@ in
|
|||
];
|
||||
|
||||
extraPackages =
|
||||
let
|
||||
isEnabled = x: lib.isBool x && x;
|
||||
in
|
||||
lib.optional (isEnabled cfg.installCargo) cfg.cargoPackage
|
||||
++ lib.optional (isEnabled cfg.installRustc) cfg.rustcPackage
|
||||
++ lib.optional (isEnabled cfg.installRustfmt) cfg.rustfmtPackage;
|
||||
lib.optional (cfg.installCargo == true) cfg.cargoPackage
|
||||
++ lib.optional (cfg.installRustc == true) cfg.rustcPackage
|
||||
++ lib.optional (cfg.installRustfmt == true) cfg.rustfmtPackage;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue