diff options
author | Profpatsch <mail@profpatsch.de> | 2018-08-08 19:26:52 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2018-09-06 18:14:27 +0200 |
commit | efdf618330a22f837f0e5e446028e918a5b4dd8a (patch) | |
tree | 6b9ad4353a2e470a3bccbbdca89247047263062b /lib/lists.nix | |
parent | 3e45b61a9920466a8ea06b8ad9350d56ade435bc (diff) | |
download | nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.tar nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.tar.gz nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.tar.bz2 nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.tar.lz nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.tar.xz nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.tar.zst nixlib-efdf618330a22f837f0e5e446028e918a5b4dd8a.zip |
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.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lists.nix b/lib/lists.nix index 9a75f179e964..9ecd8f220038 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; |