Skip to content

Commit 2434e2c

Browse files
committed
Update var to const where applicable
This no longer builds with the latest version of Zig. See: ziglang/zig#18017
1 parent 33d8f6f commit 2434e2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn build(b: *std.build.Builder) void {
88
.dependencies = &.{},
99
});
1010

11-
var main_tests = b.addTest(.{
11+
const main_tests = b.addTest(.{
1212
.root_source_file = .{ .path = "src/main.zig" },
1313
.optimize = optimize,
1414
});

src/tokenizer.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ test "save/restore tokenization" {
297297
, null);
298298

299299
const id0 = (try tokenizer.next()) orelse return error.MissingToken;
300-
var state = tokenizer.saveState();
300+
const state = tokenizer.saveState();
301301
const ws0 = (try tokenizer.next()) orelse return error.MissingToken;
302302
tokenizer.restoreState(state);
303303
const ws1 = (try tokenizer.next()) orelse return error.MissingToken;

0 commit comments

Comments
 (0)