This commit is contained in:
Sunli 2022-06-21 13:58:00 +08:00
parent aee319ee01
commit 6f7ffa9e6b

View File

@ -340,9 +340,13 @@ impl Registry {
}
write!(sdl, "union {} =", name).ok();
for ty in possible_types {
for (idx, ty) in possible_types.iter().enumerate() {
if idx == 0 {
write!(sdl, " {}", ty).ok();
} else {
write!(sdl, " | {}", ty).ok();
}
}
writeln!(sdl).ok();
}
}