This commit is contained in:
Sunli 2022-06-21 13:58:00 +08:00
parent aee319ee01
commit 6f7ffa9e6b
1 changed files with 6 additions and 2 deletions

View File

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