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.
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user