about summary refs log tree commit diff
diff options
context:
space:
mode:
authorScott Olson <scott@solson.me>2016-02-18 22:10:43 -0600
committerScott Olson <scott@solson.me>2016-02-18 22:39:43 -0600
commit9cf93ba13587dba8116fa99279e51cf60c7bde88 (patch)
treefde210ce2c297269211d1e0d62d4bc964035e55d
parent412dd80149e837ef89171f1fe0f0423e3b72aa21 (diff)
downloadnixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.tar
nixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.tar.gz
nixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.tar.bz2
nixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.tar.lz
nixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.tar.xz
nixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.tar.zst
nixlib-9cf93ba13587dba8116fa99279e51cf60c7bde88.zip
Simplify fetchurl assertion logic.
The two lines I removed technically assert the exact same thing, since `!a -> b`
is equivalent to `a || b`. So, I replaced the two lines with the more symmetric
form to make it clearer.
-rw-r--r--pkgs/build-support/fetchurl/default.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix
index 804974954d10..2c802bb3679c 100644
--- a/pkgs/build-support/fetchurl/default.nix
+++ b/pkgs/build-support/fetchurl/default.nix
@@ -85,8 +85,7 @@ in
 }:
 
 assert builtins.isList urls;
-assert urls != [] -> url == "";
-assert url != "" -> urls == [];
+assert urls == [] || url == "";
 
 
 let