writer needs to be a constant to the pointer of the writer field
This commit is contained in:
		
							parent
							
								
									53ac60c875
								
							
						
					
					
						commit
						5334cc3bfe
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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); |     var output = try std.Io.Writer.Allocating.initCapacity(allocator, 1024 * 1024 * 2); | ||||||
|     defer output.deinit(); |     defer output.deinit(); | ||||||
| 
 | 
 | ||||||
|     var writer = output.writer; |     const writer = &output.writer; | ||||||
| 
 | 
 | ||||||
|     _ = try writer.write("const std = @import(\"std\");\n"); |     _ = try writer.write("const std = @import(\"std\");\n"); | ||||||
|     _ = try writer.write("const smithy = @import(\"smithy\");\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, |         allocator, | ||||||
|         ";", |         ";", | ||||||
|         file_name, |         file_name, | ||||||
|         &writer, |         writer, | ||||||
|     ) catch |err| { |     ) catch |err| { | ||||||
|         std.log.err("Error processing file: {s}", .{file_name}); |         std.log.err("Error processing file: {s}", .{file_name}); | ||||||
|         return err; |         return err; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue