Escape 'type' keyword in generated Rust code
Use raw identifiers for fields named "type" to avoid conflicts with the Rust keyword. Fix field number indexing in tests.
This commit is contained in:
+1
-1
@@ -520,7 +520,7 @@ mod tests {
|
||||
|
||||
// Validate that fields appear in the expected relative order
|
||||
let field_numbers: Vec<u32> = acc.fields()
|
||||
.map(|r| r.expect("Failed to decode field").0.field_number)
|
||||
.map(|r| r.expect("Failed to decode field").1.field_number)
|
||||
.collect();
|
||||
|
||||
let essential_fields = [1, 2, 3, 14, 16, 20];
|
||||
|
||||
Reference in New Issue
Block a user