File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -229,13 +229,13 @@ impl Visitor<'_> {
229
229
)
230
230
}
231
231
}
232
- Storage :: Table { index } => {
233
- for child_id in child_ids {
232
+ Storage :: Table => {
233
+ for ( index , child_id) in child_ids. iter ( ) . enumerate ( ) {
234
234
self . trap_output . push ( TrapEntry :: ChildOf (
235
235
node_type_name ( & field. parent . kind , field. parent . named ) ,
236
236
parent_id,
237
237
field. get_name ( ) ,
238
- Index ( * index) ,
238
+ Index ( index) ,
239
239
* child_id,
240
240
) ) ;
241
241
}
Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ fn create_field_getters(
400
400
* main_table_column_index += 1 ;
401
401
result
402
402
}
403
- node_types:: Storage :: Table { index : _ } => {
403
+ node_types:: Storage :: Table => {
404
404
let field_table_name = format ! ( "{}_{}" , parent_name, & field. get_name( ) ) ;
405
405
(
406
406
ql:: Predicate {
Original file line number Diff line number Diff line change @@ -47,9 +47,7 @@ pub enum Storage {
47
47
/// the field is stored as a column in the parent table
48
48
Column ,
49
49
// the field is store in a link table
50
- Table {
51
- index : usize ,
52
- } ,
50
+ Table ,
53
51
}
54
52
55
53
pub fn read_node_types ( node_types_path : & Path ) -> std:: io:: Result < Vec < Entry > > {
@@ -132,9 +130,7 @@ fn add_field(
132
130
} else {
133
131
// This field can appear zero or multiple times, so put
134
132
// it in an auxiliary table.
135
- storage = Storage :: Table {
136
- index : fields. len ( ) ,
137
- } ;
133
+ storage = Storage :: Table ;
138
134
}
139
135
fields. push ( Field {
140
136
parent : TypeName {
You can’t perform that action at this time.
0 commit comments