@@ -117,27 +117,20 @@ impl PathItemCache {
117
117
PathItemLocation :: OperationalPointReference ( OperationalPointReference {
118
118
reference : OperationalPointIdentifier :: OperationalPointId { operational_point } ,
119
119
track_reference,
120
- } ) => match self . get_from_id ( & operational_point. 0 ) {
121
- Some ( op) => {
122
- let track_offsets = op. track_offset ( ) ;
123
- let track_offsets =
124
- self . track_reference_filter ( track_offsets, track_reference) ;
125
- if track_offsets. is_empty ( ) {
126
- invalid_path_items. push ( InvalidPathItem {
127
- index,
128
- path_item : path_item. clone ( ) ,
129
- } ) ;
130
- continue ;
131
- } ;
132
- track_offsets
120
+ } ) => {
121
+ let mut track_offsets = vec ! [ ] ;
122
+ if let Some ( op) = self . get_from_id ( & operational_point. 0 ) {
123
+ track_offsets = op. track_offset ( ) ;
124
+ track_offsets = self . track_reference_filter ( track_offsets, track_reference) ;
133
125
}
134
- None => {
126
+ if track_offsets . is_empty ( ) {
135
127
invalid_path_items. push ( InvalidPathItem {
136
128
index,
137
129
path_item : path_item. clone ( ) ,
138
130
} ) ;
139
131
continue ;
140
132
}
133
+ track_offsets
141
134
} ,
142
135
PathItemLocation :: OperationalPointReference ( OperationalPointReference {
143
136
reference :
@@ -152,13 +145,6 @@ impl PathItemCache {
152
145
. cloned ( )
153
146
. unwrap_or_default ( ) ;
154
147
let ops = secondary_code_filter ( secondary_code, ops) ;
155
- if ops. is_empty ( ) {
156
- invalid_path_items. push ( InvalidPathItem {
157
- index,
158
- path_item : path_item. clone ( ) ,
159
- } ) ;
160
- continue ;
161
- }
162
148
let track_offsets = track_offsets_from_ops ( & ops) ;
163
149
let track_offsets = self . track_reference_filter ( track_offsets, track_reference) ;
164
150
if track_offsets. is_empty ( ) {
@@ -183,13 +169,6 @@ impl PathItemCache {
183
169
. cloned ( )
184
170
. unwrap_or_default ( ) ;
185
171
let ops = secondary_code_filter ( secondary_code, ops) ;
186
- if ops. is_empty ( ) {
187
- invalid_path_items. push ( InvalidPathItem {
188
- index,
189
- path_item : path_item. clone ( ) ,
190
- } ) ;
191
- continue ;
192
- }
193
172
let track_offsets = track_offsets_from_ops ( & ops) ;
194
173
let track_offsets = self . track_reference_filter ( track_offsets, track_reference) ;
195
174
if track_offsets. is_empty ( ) {
0 commit comments