Skip to content

Commit

Permalink
chore(zig-0.14.0): move project to upcoming new zig version
Browse files Browse the repository at this point in the history
  • Loading branch information
yamafaktory committed Jan 24, 2025
1 parent 47844aa commit a0a0076
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.{
.name = "hypergraphz",
.version = "0.0.1",
.minimum_zig_version = "0.13.0",
.minimum_zig_version = "0.14.0",
.paths = .{
"LICENSE",
"README.md",
Expand Down
8 changes: 4 additions & 4 deletions src/hypergraphz.zig
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ pub fn HypergraphZ(comptime H: type, comptime V: type) type {
id_counter: HypergraphZId = 0,

comptime {
assert(@typeInfo(H) == .Struct);
assert(@typeInfo(H) == .@"struct");
var weightFieldType: ?type = null;
for (@typeInfo(H).Struct.fields) |*f| {
for (@typeInfo(H).@"struct".fields) |f| {
if (std.mem.eql(u8, f.name, "weight")) {
weightFieldType = f.type;
}
}
const isWeightInt = if (weightFieldType) |w| @typeInfo(w) == .Int else false;
const isWeightInt = if (weightFieldType) |w| @typeInfo(w) == .int else false;
assert(isWeightInt);
assert(@typeInfo(V) == .Struct);
assert(@typeInfo(V) == .@"struct");
}

/// Vertex representation with data and relations as an array hashmap.
Expand Down

0 comments on commit a0a0076

Please sign in to comment.