From 3f81cdf3acac59ff1be0932c9419f681f6707c08 Mon Sep 17 00:00:00 2001 From: Manlio Perillo Date: Sat, 6 May 2023 18:18:08 +0200 Subject: [PATCH] build: improve Exercise.addExecutable Replace the file_path variable with path. --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 5b60f2d..6d8e34b 100644 --- a/build.zig +++ b/build.zig @@ -63,12 +63,12 @@ pub const Exercise = struct { /// Returns the CompileStep for this exercise. pub fn addExecutable(self: Exercise, b: *Build, work_path: []const u8) *CompileStep { - const file_path = join(b.allocator, &.{ work_path, self.main_file }) catch + const path = join(b.allocator, &.{ work_path, self.main_file }) catch @panic("OOM"); return b.addExecutable(.{ .name = self.name(), - .root_source_file = .{ .path = file_path }, + .root_source_file = .{ .path = path }, .link_libc = self.link_libc, }); }