@@ -26,6 +26,7 @@ use common::{
26
26
Resource ,
27
27
} ,
28
28
document:: {
29
+ ParseDocument ,
29
30
ParsedDocument ,
30
31
ResolvedDocument ,
31
32
} ,
@@ -87,7 +88,7 @@ impl SystemTable for ComponentsTable {
87
88
}
88
89
89
90
fn validate_document ( & self , document : ResolvedDocument ) -> anyhow:: Result < ( ) > {
90
- ParsedDocument :: < ComponentMetadata > :: try_from ( document) ?;
91
+ ParseDocument :: < ComponentMetadata > :: parse ( document) ?;
91
92
Ok ( ( ) )
92
93
}
93
94
}
@@ -149,7 +150,7 @@ impl<'a, RT: Runtime> BootstrapComponentsModel<'a, RT> {
149
150
) ?;
150
151
let mut components = Vec :: new ( ) ;
151
152
while let Some ( doc) = query. next ( self . tx , None ) . await ? {
152
- components. push ( doc. try_into ( ) ?) ;
153
+ components. push ( doc. parse ( ) ?) ;
153
154
}
154
155
Ok ( components)
155
156
}
@@ -209,7 +210,7 @@ impl<'a, RT: Runtime> BootstrapComponentsModel<'a, RT> {
209
210
. get ( component_doc_id)
210
211
. await ?
211
212
. context ( "component missing" ) ?
212
- . try_into ( ) ?;
213
+ . parse ( ) ?;
213
214
ComponentDefinitionId :: Child ( component_doc. definition_id )
214
215
} ,
215
216
} ;
@@ -227,7 +228,7 @@ impl<'a, RT: Runtime> BootstrapComponentsModel<'a, RT> {
227
228
self . tx
228
229
. get ( component_doc_id)
229
230
. await ?
230
- . map ( TryInto :: try_into )
231
+ . map ( ParseDocument :: parse )
231
232
. transpose ( ) ?
232
233
} ,
233
234
} ;
@@ -296,7 +297,7 @@ impl<'a, RT: Runtime> BootstrapComponentsModel<'a, RT> {
296
297
let Some ( doc) = self . tx . get ( component_definition_doc_id) . await ? else {
297
298
return Ok ( None ) ;
298
299
} ;
299
- let mut doc: ParsedDocument < ComponentDefinitionMetadata > = doc. try_into ( ) ?;
300
+ let mut doc: ParsedDocument < ComponentDefinitionMetadata > = doc. parse ( ) ?;
300
301
if !doc. exports . is_empty ( ) {
301
302
metrics:: log_nonempty_component_exports ( ) ;
302
303
doc. exports = BTreeMap :: new ( ) ;
@@ -344,7 +345,7 @@ impl<'a, RT: Runtime> BootstrapComponentsModel<'a, RT> {
344
345
) ?;
345
346
let mut definitions = BTreeMap :: new ( ) ;
346
347
while let Some ( doc) = query. next ( self . tx , None ) . await ? {
347
- let mut definition: ParsedDocument < ComponentDefinitionMetadata > = doc. try_into ( ) ?;
348
+ let mut definition: ParsedDocument < ComponentDefinitionMetadata > = doc. parse ( ) ?;
348
349
if !definition. exports . is_empty ( ) {
349
350
metrics:: log_nonempty_component_exports ( ) ;
350
351
definition. exports = BTreeMap :: new ( ) ;
0 commit comments