From 5334cc3bfee3920d0e6187bcb45c1d785351a82b Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Fri, 22 Aug 2025 13:30:09 -0700 Subject: [PATCH] writer needs to be a constant to the pointer of the writer field --- codegen/src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/src/main.zig b/codegen/src/main.zig index fd4123f..1782ab1 100644 --- a/codegen/src/main.zig +++ b/codegen/src/main.zig @@ -209,7 +209,7 @@ fn processFile(file_name: []const u8, output_dir: std.fs.Dir, manifest: *std.Io. var output = try std.Io.Writer.Allocating.initCapacity(allocator, 1024 * 1024 * 2); defer output.deinit(); - var writer = output.writer; + const writer = &output.writer; _ = try writer.write("const std = @import(\"std\");\n"); _ = try writer.write("const smithy = @import(\"smithy\");\n"); @@ -226,7 +226,7 @@ fn processFile(file_name: []const u8, output_dir: std.fs.Dir, manifest: *std.Io. allocator, ";", file_name, - &writer, + writer, ) catch |err| { std.log.err("Error processing file: {s}", .{file_name}); return err;