diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-10 20:16:12 +0200 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2023-07-12 09:36:28 +0100 |
commit | bec27fabee7ff51a4788840479b1730ed1b64427 (patch) | |
tree | 638353517b8f8eb3b5b8d4fbc7172cd1aa42d47d /nixos/tests/common | |
parent | b63179691fb19cd8bb63fbb005bb3120a36deba0 (diff) |
treewide: use lib.optional instead of 'then []'
Diffstat (limited to 'nixos/tests/common')
-rw-r--r-- | nixos/tests/common/resolver.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/tests/common/resolver.nix b/nixos/tests/common/resolver.nix index 3ddf730668c4f..609058a7374a5 100644 --- a/nixos/tests/common/resolver.nix +++ b/nixos/tests/common/resolver.nix @@ -63,7 +63,7 @@ matched = builtins.match "[ \t]+(${reHost})(.*)" str; continue = lib.singleton (lib.head matched) ++ matchAliases (lib.last matched); - in if matched == null then [] else continue; + in lib.optional (matched != null) continue; matchLine = str: let result = builtins.match "[ \t]*(${reIp})[ \t]+(${reHost})(.*)" str; |