aboutsummaryrefslogtreecommitdiff
path: root/src/zilch/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/zilch/html')
-rw-r--r--src/zilch/html/Attribute.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/zilch/html/Attribute.zig b/src/zilch/html/Attribute.zig
index 1db49a0..0aa0354 100644
--- a/src/zilch/html/Attribute.zig
+++ b/src/zilch/html/Attribute.zig
@@ -13,12 +13,11 @@ pub fn from(attributes: anytype) []const Self {
@compileError("struct needed");
}
- const fields = info.@"struct".fields;
+ const fields = info.@"struct".field_names;
var attrs: []const Self = &.{};
- for (fields) |field| {
- const name = field.name;
+ for (fields) |name| {
const value = @field(attributes, name);
const next_attr: []const Self = &.{.{ .name = name, .value = value }};