aboutsummaryrefslogtreecommitdiff
path: root/lib/lists.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-08-08 19:26:52 +0200
committerProfpatsch <mail@profpatsch.de>2018-09-06 18:14:27 +0200
commitefdf618330a22f837f0e5e446028e918a5b4dd8a (patch)
tree6b9ad4353a2e470a3bccbbdca89247047263062b /lib/lists.nix
parent3e45b61a9920466a8ea06b8ad9350d56ade435bc (diff)
lib: move assertMsg and assertOneOf to their own library file
Since the `assertOneOf` uses `lib.generators`, they are not really trivial anymore and should go into their own library file.
Diffstat (limited to 'lib/lists.nix')
-rw-r--r--lib/lists.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lists.nix b/lib/lists.nix
index 9a75f179e96..9ecd8f22003 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -509,7 +509,7 @@ rec {
=> 3
*/
last = list:
- assert assertMsg (list != []) "lists.last: list must not be empty!";
+ assert lib.assertMsg (list != []) "lists.last: list must not be empty!";
elemAt list (length list - 1);
/* Return all elements but the last
@@ -519,7 +519,7 @@ rec {
=> [ 1 2 ]
*/
init = list:
- assert assertMsg (list != []) "lists.init: list must not be empty!";
+ assert lib.assertMsg (list != []) "lists.init: list must not be empty!";
take (length list - 1) list;