File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -176,17 +176,13 @@ impl AssetSaver for ManyBoxesSaver {
176176 . boxes
177177 . iter ( )
178178 . map ( |handle| {
179- // TODO: We should have a better to get the asset for a subasset handle.
180- let label = handle
181- . path ( )
182- . and_then ( |path| path. label ( ) )
183- . ok_or_else ( || format ! ( "Failed to get label for handle {handle:?}" ) ) ?;
184179 asset
185- . get_labeled :: < OneBox > ( label)
186- . map ( |subasset| subasset. get ( ) . clone ( ) )
187- . ok_or_else ( || format ! ( "Failed to find labeled asset for label {label}" ) )
180+ . get_labeled_by_id :: < OneBox > ( handle)
181+ . unwrap ( )
182+ . get ( )
183+ . clone ( )
188184 } )
189- . collect :: < Result < Vec < _ > , _ > > ( ) ? ;
185+ . collect ( ) ;
190186
191187 // Note: serializing to string isn't ideal since we can't do a streaming write, but this is
192188 // fine for an example.
You can’t perform that action at this time.
0 commit comments