Add assert related to RocList capacity of 0

This commit is contained in:
Brendan Hansknecht 2021-10-24 12:04:19 -07:00
parent af49d9bdb2
commit 31f61d81f1

View file

@ -136,6 +136,7 @@ impl<T> RocList<T> {
where where
T: Clone, T: Clone,
{ {
assert!(capacity >= 0);
assert!(slice.len() <= capacity); assert!(slice.len() <= capacity);
let ptr = slice.as_ptr(); let ptr = slice.as_ptr();