@@ -72,8 +72,8 @@ impl Expression {
72
72
73
73
Self :: Child ( expr, key) => {
74
74
match expr. get ( root) {
75
- Some ( value ) => {
76
- match value . kind {
75
+ Some ( child ) => {
76
+ match child . kind {
77
77
// Access on a table is identical to Identifier, it just forwards
78
78
ValueKind :: Table ( ref map) => map. get ( & key) ,
79
79
@@ -87,7 +87,7 @@ impl Expression {
87
87
}
88
88
89
89
Self :: Subscript ( expr, index) => match expr. get ( root) {
90
- Some ( value ) => match value . kind {
90
+ Some ( child ) => match child . kind {
91
91
ValueKind :: Array ( ref array) => {
92
92
let index = abs_index ( index, array. len ( ) ) . ok ( ) ?;
93
93
array. get ( index)
@@ -117,12 +117,12 @@ impl Expression {
117
117
}
118
118
119
119
Self :: Child ( ref expr, ref key) => {
120
- let value = expr. get_mut_forcibly ( root) ;
121
- if !matches ! ( value . kind, ValueKind :: Table ( _) ) {
122
- * value = Map :: < String , Value > :: new ( ) . into ( ) ;
120
+ let child = expr. get_mut_forcibly ( root) ;
121
+ if !matches ! ( child . kind, ValueKind :: Table ( _) ) {
122
+ * child = Map :: < String , Value > :: new ( ) . into ( ) ;
123
123
}
124
124
125
- if let ValueKind :: Table ( ref mut map) = value . kind {
125
+ if let ValueKind :: Table ( ref mut map) = child . kind {
126
126
map. entry ( key. clone ( ) )
127
127
. or_insert_with ( || Value :: new ( None , ValueKind :: Nil ) )
128
128
} else {
@@ -131,12 +131,12 @@ impl Expression {
131
131
}
132
132
133
133
Self :: Subscript ( ref expr, index) => {
134
- let value = expr. get_mut_forcibly ( root) ;
135
- if !matches ! ( value . kind, ValueKind :: Array ( _) ) {
136
- * value = Vec :: < Value > :: new ( ) . into ( ) ;
134
+ let child = expr. get_mut_forcibly ( root) ;
135
+ if !matches ! ( child . kind, ValueKind :: Array ( _) ) {
136
+ * child = Vec :: < Value > :: new ( ) . into ( ) ;
137
137
}
138
138
139
- if let ValueKind :: Array ( ref mut array) = value . kind {
139
+ if let ValueKind :: Array ( ref mut array) = child . kind {
140
140
let uindex = match abs_index ( index, array. len ( ) ) {
141
141
Ok ( uindex) => {
142
142
if uindex >= array. len ( ) {
0 commit comments