Fix RocList memory leak

Also, reduces the number of elements in the quicksort example to make it
run better with valgrind.
This commit is contained in:
Brendan Hansknecht 2020-10-11 19:00:35 -07:00
parent a092a7642a
commit 97c23557c7
2 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ impl<T> RocList<T> {
let value = *self.get_storage_ptr();
// NOTE doesn't work with elements of 16 or more bytes
match usize::cmp(&0, &value) {
match isize::cmp(&(value as isize), &0) {
Equal => Some(Storage::ReadOnly),
Less => Some(Storage::Refcounted(value)),
Greater => Some(Storage::Capacity(value)),