diff --git a/compiler/builtins/bitcode/src/str.zig b/compiler/builtins/bitcode/src/str.zig index 572eaa14e0..e18eca4306 100644 --- a/compiler/builtins/bitcode/src/str.zig +++ b/compiler/builtins/bitcode/src/str.zig @@ -1018,9 +1018,9 @@ fn fromUtf8(allocator: *Allocator, arg: RocList) FromUtf8Result { } else { const temp = errorToProblem(@ptrCast([*]u8, arg.bytes), arg.length); - // TODO what should we do RC-wise here - // const data_bytes = arg.len(); - // utils.decref(allocator, @alignOf(usize), arg.list_bytes, data_bytes); + // consume the input list + const data_bytes = arg.len(); + utils.decref(allocator, @alignOf(usize), arg.bytes, data_bytes); return FromUtf8Result{ .is_ok = false, .string = RocStr.empty(), .byte_index = temp.index, .problem_code = temp.problem }; } diff --git a/examples/benchmarks/TestBase64.roc b/examples/benchmarks/TestBase64.roc index 75adbca8be..27c5617ebf 100644 --- a/examples/benchmarks/TestBase64.roc +++ b/examples/benchmarks/TestBase64.roc @@ -7,7 +7,6 @@ IO a : Task.Task a [] main : IO {} main = - # when fromBytes [ 0 ] is when Base64.fromBytes (Str.toBytes "Hello World") is Ok str -> Task.putLine str