From 51595d6b75d8ac2443a2c142c71f2a617c12fe96 Mon Sep 17 00:00:00 2001 From: mlugg Date: Fri, 10 Nov 2023 05:27:17 +0000 Subject: lib: correct unnecessary uses of 'var' --- lib/std/Build/Cache/DepTokenizer.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/std/Build/Cache') diff --git a/lib/std/Build/Cache/DepTokenizer.zig b/lib/std/Build/Cache/DepTokenizer.zig index 0e5224edc0..9edc53cbb2 100644 --- a/lib/std/Build/Cache/DepTokenizer.zig +++ b/lib/std/Build/Cache/DepTokenizer.zig @@ -950,7 +950,7 @@ fn printSection(out: anytype, label: []const u8, bytes: []const u8) !void { fn printLabel(out: anytype, label: []const u8, bytes: []const u8) !void { var buf: [80]u8 = undefined; - var text = try std.fmt.bufPrint(buf[0..], "{s} {d} bytes ", .{ label, bytes.len }); + const text = try std.fmt.bufPrint(buf[0..], "{s} {d} bytes ", .{ label, bytes.len }); try out.writeAll(text); var i: usize = text.len; const end = 79; @@ -983,12 +983,12 @@ fn hexDump(out: anytype, bytes: []const u8) !void { try printDecValue(out, offset, 8); try out.writeAll(":"); try out.writeAll(" "); - var end1 = @min(offset + n, offset + 8); + const end1 = @min(offset + n, offset + 8); for (bytes[offset..end1]) |b| { try out.writeAll(" "); try printHexValue(out, b, 2); } - var end2 = offset + n; + const end2 = offset + n; if (end2 > end1) { try out.writeAll(" "); for (bytes[end1..end2]) |b| { -- cgit v1.2.3