From 4c14bfd5188bb61d7076bc33fccbcc6a5e9dac01 Mon Sep 17 00:00:00 2001 From: Komari Spaghetti Date: Sat, 8 May 2021 18:08:52 +0200 Subject: Modernize codebase * Better naming for variables * Follow naming style of enums * Use `writer()` instead of `outStream()` * Change many initializers to be a one liner * Don't explicitly initialize fields to their default value --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index ef67a5f..bef10be 100644 --- a/build.zig +++ b/build.zig @@ -1,8 +1,8 @@ const builtin = @import("builtin"); const std = @import("std"); -const Mode = builtin.Mode; const Builder = std.build.Builder; +const Mode = builtin.Mode; pub fn build(b: *Builder) void { const mode = b.standardReleaseOptions(); @@ -58,7 +58,7 @@ fn readMeStep(b: *Builder) *std.build.Step { fn make(step: *std.build.Step) anyerror!void { @setEvalBranchQuota(10000); const file = try std.fs.cwd().createFile("README.md", .{}); - const stream = &file.outStream(); + const stream = file.writer(); try stream.print(@embedFile("example/README.md.template"), .{ @embedFile("example/simple.zig"), @embedFile("example/simple-error.zig"), -- cgit v1.2.3