Fixed constructor args

This commit is contained in:
2026-06-04 10:39:41 +02:00
parent a4df59927e
commit 7a5e03afd6
6 changed files with 57 additions and 30 deletions
+6 -2
View File
@@ -248,8 +248,12 @@ impl GenRust for Pattern {
Self::Struct(path, inner) => {
cg.add(&path.get_rust());
cg.add(" {");
for pat in inner {
pat.gen_rust(ctx, cg);
for (name, pat) in inner {
cg.add(&name.get_rust());
if let Some(pat) = pat {
cg.add(": ");
pat.gen_rust(ctx, cg);
}
cg.add(",");
}
cg.add("}");