Skip to content

Commit fe870dc

Browse files
authored
Merge pull request #12 from priddis/fix-build-errors
Fix build errors when building with latest zig version
2 parents 956d76d + a98c572 commit fe870dc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn build(b: *std.build.Builder) void {
2525
const test_step = b.step("test", "Run all the tests");
2626
test_step.dependOn(b.getInstallStep());
2727

28-
var tests = b.addTest(.{
28+
const tests = b.addTest(.{
2929
.root_source_file = .{ .path = "tests/tests.zig" },
3030
.target = target,
3131
});

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = "lspmm-zig",
33
.version = "0.1.0",
4-
4+
.paths = .{"build.zig", "build.zig.zon", "src"},
55
.dependencies = .{},
66
}

src/main.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn isOrActuallyEnum(ort: MetaModel.OrType) bool {
9191

9292
fn isTypeNull(typ: MetaModel.Type) bool {
9393
if (typ != .@"or") return false;
94-
var ort = typ.@"or";
94+
const ort = typ.@"or";
9595
return (ort.items.len == 2 and ort.items[1] == .base and ort.items[1].base.name == .null) or (ort.items[ort.items.len - 1] == .base and ort.items[ort.items.len - 1].base.name == .null);
9696
}
9797

@@ -163,7 +163,7 @@ fn writeType(meta_model: MetaModel, writer: anytype, typ: MetaModel.Type) @TypeO
163163
}
164164
try writer.writeByte('}');
165165
} else {
166-
var has_null = ort.items[ort.items.len - 1] == .base and ort.items[ort.items.len - 1].base.name == .null;
166+
const has_null = ort.items[ort.items.len - 1] == .base and ort.items[ort.items.len - 1].base.name == .null;
167167

168168
if (has_null) try writer.writeByte('?');
169169

0 commit comments

Comments
 (0)