Skip to content

Commit d50eb1d

Browse files
committed
fix: add assertion for empty field back
1 parent a98107b commit d50eb1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

soa-derive-internal/src/input.rs

+4
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ impl Input {
179179
}
180180
}
181181
_ => panic!("#[derive(StructOfArray)] only supports struct"),
182+
};
183+
184+
if fields.is_empty() {
185+
panic!("#[derive(StructOfArray)] only supports struct with fields");
182186
}
183187

184188
let mut extra_attrs = ExtraAttributes::new();

0 commit comments

Comments
 (0)