File tree Expand file tree Collapse file tree
turbopack/crates/turbopack-core/src/introspect Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use anyhow:: Result ;
22use turbo_rcstr:: RcStr ;
3- use turbo_tasks:: { ValueToString , Vc } ;
3+ use turbo_tasks:: { ResolvedVc , ValueToString , Vc } ;
44
55use super :: {
66 utils:: { children_from_module_references, content_to_details} ,
77 Introspectable , IntrospectableChildren ,
88} ;
99use crate :: { asset:: Asset , module:: Module } ;
1010
11- #[ turbo_tasks:: value( local ) ]
12- pub struct IntrospectableModule ( Vc < Box < dyn Module > > ) ;
11+ #[ turbo_tasks:: value]
12+ pub struct IntrospectableModule ( ResolvedVc < Box < dyn Module > > ) ;
1313
1414#[ turbo_tasks:: value_impl]
1515impl IntrospectableModule {
1616 #[ turbo_tasks:: function]
17- pub async fn new ( asset : Vc < Box < dyn Module > > ) -> Result < Vc < Box < dyn Introspectable > > > {
18- Ok ( Vc :: try_resolve_sidecast :: < Box < dyn Introspectable > > ( asset)
17+ pub async fn new ( asset : ResolvedVc < Box < dyn Module > > ) -> Result < Vc < Box < dyn Introspectable > > > {
18+ Ok ( * ResolvedVc :: try_sidecast :: < Box < dyn Introspectable > > ( asset)
1919 . await ?
20- . unwrap_or_else ( || Vc :: upcast ( IntrospectableModule ( asset) . cell ( ) ) ) )
20+ . unwrap_or_else ( || ResolvedVc :: upcast ( IntrospectableModule ( asset) . resolved_cell ( ) ) ) )
2121 }
2222}
2323
Original file line number Diff line number Diff line change 11use anyhow:: Result ;
22use turbo_rcstr:: RcStr ;
3- use turbo_tasks:: { ValueToString , Vc } ;
3+ use turbo_tasks:: { ResolvedVc , ValueToString , Vc } ;
44
55use super :: { utils:: content_to_details, Introspectable } ;
66use crate :: { asset:: Asset , source:: Source } ;
77
8- #[ turbo_tasks:: value( local ) ]
9- pub struct IntrospectableSource ( Vc < Box < dyn Source > > ) ;
8+ #[ turbo_tasks:: value]
9+ pub struct IntrospectableSource ( ResolvedVc < Box < dyn Source > > ) ;
1010
1111#[ turbo_tasks:: value_impl]
1212impl IntrospectableSource {
1313 #[ turbo_tasks:: function]
14- pub async fn new ( asset : Vc < Box < dyn Source > > ) -> Result < Vc < Box < dyn Introspectable > > > {
15- Ok ( Vc :: try_resolve_sidecast :: < Box < dyn Introspectable > > ( asset)
14+ pub async fn new ( asset : ResolvedVc < Box < dyn Source > > ) -> Result < Vc < Box < dyn Introspectable > > > {
15+ Ok ( * ResolvedVc :: try_sidecast :: < Box < dyn Introspectable > > ( asset)
1616 . await ?
17- . unwrap_or_else ( || Vc :: upcast ( IntrospectableSource ( asset) . cell ( ) ) ) )
17+ . unwrap_or_else ( || ResolvedVc :: upcast ( IntrospectableSource ( asset) . resolved_cell ( ) ) ) )
1818 }
1919}
2020
You can’t perform that action at this time.
0 commit comments