mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Acknowledge possibility of roc_alloc failing
This commit is contained in:
parent
9b05d8dd50
commit
778d32f6b2
4 changed files with 20 additions and 11 deletions
|
@ -750,7 +750,8 @@ pub fn dictWalk(
|
|||
const alignment_u32 = alignment.toU32();
|
||||
// allocate space to write the result of the stepper into
|
||||
// experimentally aliasing the accum and output pointers is not a good idea
|
||||
const bytes_ptr: [*]u8 = utils.alloc(accum_width, alignment_u32);
|
||||
// TODO handle alloc failing!
|
||||
const bytes_ptr: [*]u8 = utils.alloc(accum_width, alignment_u32) orelse unreachable;
|
||||
var b1 = output orelse unreachable;
|
||||
var b2 = bytes_ptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue