Remove cast from void! to anyfault. Rename @catchof to @catch

This commit is contained in:
Christoffer Lerno
2023-09-09 22:49:32 +02:00
parent dfe097931c
commit d67e846712
21 changed files with 250 additions and 185 deletions

View File

@@ -158,7 +158,7 @@ fn void! test_pop()
assert(list.first()! == 23);
assert(list.pop()! == 23);
assert(list.len() == 0);
assert(@catchof(list.pop()));
assert(@catch(list.pop()));
assert(list.len() == 0);
list.push(55);
assert(list.len() == 1);
@@ -182,7 +182,7 @@ fn void! test_remove_first()
assert(list.first()! == 23);
assert(@ok(list.remove_first()));
assert(list.len() == 0);
assert(@catchof(list.pop()));
assert(@catch(list.pop()));
assert(list.len() == 0);
list.push(55);
assert(list.len() == 1);
@@ -206,7 +206,7 @@ fn void! test_remove_last()
assert(list.last()! == -3);
assert(@ok(list.remove_last()));
assert(list.len() == 0);
assert(@catchof(list.remove_last()));
assert(@catch(list.remove_last()));
assert(list.len() == 0);
list.push(55);
assert(list.len() == 1);