Skip to content

Commit 23ac4dd

Browse files
sergpolkinVexu
authored andcommitted
fix: print targets
1 parent bd3e248 commit 23ac4dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/print_targets.zig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ pub fn cmdTargets(
9999
for (arch.allCpuModels()) |model| {
100100
try jws.objectField(model.name);
101101
try jws.beginArray();
102-
for (arch.allFeaturesList(), 0..) |feature, i| {
103-
if (model.features.isEnabled(@intCast(u8, i))) {
102+
for (arch.allFeaturesList(), 0..) |feature, i_usize| {
103+
const index = @intCast(Target.Cpu.Feature.Set.Index, i_usize);
104+
if (model.features.isEnabled(index)) {
104105
try jws.arrayElem();
105106
try jws.emitString(feature.name);
106107
}

0 commit comments

Comments
 (0)