diff --git a/lib/std/core/string.c3 b/lib/std/core/string.c3 index 31275f81e..aa17a0cb3 100644 --- a/lib/std/core/string.c3 +++ b/lib/std/core/string.c3 @@ -757,8 +757,8 @@ macro String new_struct_to_str(x, Allocator allocator = allocator::heap()) { s.new_init(allocator: mem); io::fprint(&s, x)!!; + return s.copy_str(allocator); }; - return s.copy_str(allocator); } -macro String temp_struct_to_str(x) => new_struct_to_str(x, allocator::temp()); \ No newline at end of file +macro String temp_struct_to_str(x) => new_struct_to_str(x, allocator::temp());