File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
bevy_mod_scripting_bindings/src
bevy_mod_scripting_functions/src
testing_crates/test_utils/src Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ impl ReflectReference {
275275 InteropError :: invariant ( "Cannot determine handle type ID from reflection" )
276276 . with_context ( "Asset handle reflection failed - handle may be invalid or corrupted" )
277277 } ) ?;
278-
278+
279279 let type_registry = world. type_registry ( ) ;
280280 let type_registry = type_registry. read ( ) ;
281281 let reflect_handle = type_registry
@@ -300,8 +300,9 @@ impl ReflectReference {
300300 reflect_handle
301301 . downcast_handle_untyped ( reflect_any. as_any ( ) )
302302 . ok_or_else ( || {
303- InteropError :: could_not_downcast ( self . clone ( ) , handle_type_id)
304- . with_context ( "UntypedHandle downcast failed - handle may be of wrong type or corrupted" )
303+ InteropError :: could_not_downcast ( self . clone ( ) , handle_type_id) . with_context (
304+ "UntypedHandle downcast failed - handle may be of wrong type or corrupted" ,
305+ )
305306 } )
306307 } ) ??;
307308 Ok ( untyped_handle)
Original file line number Diff line number Diff line change @@ -528,7 +528,11 @@ impl World {
528528 ) -> Result < Option < ReflectReference > , InteropError > {
529529 profiling:: function_scope!( "get_asset" ) ;
530530 let untyped_handle = handle_reference. try_untyped_asset_handle ( ctxt. world ( ) ?) ?;
531- Ok ( Some ( ReflectReference :: new_asset_ref ( untyped_handle, registration. type_id ( ) , ctxt. world ( ) ?) ?) )
531+ Ok ( Some ( ReflectReference :: new_asset_ref (
532+ untyped_handle,
533+ registration. type_id ( ) ,
534+ ctxt. world ( ) ?,
535+ ) ?) )
532536 }
533537
534538 /// Checks if can get asset handle
@@ -537,7 +541,9 @@ impl World {
537541 handle_reference : ReflectReference ,
538542 ) -> Result < bool , InteropError > {
539543 profiling:: function_scope!( "has_asset" ) ;
540- Ok ( handle_reference. try_untyped_asset_handle ( ctxt. world ( ) ?) . is_ok ( ) )
544+ Ok ( handle_reference
545+ . try_untyped_asset_handle ( ctxt. world ( ) ?)
546+ . is_ok ( ) )
541547 }
542548}
543549
Original file line number Diff line number Diff line change 11use std:: { alloc:: Layout , collections:: HashMap } ;
22
3-
43use bevy_app:: { App , ScheduleRunnerPlugin , TaskPoolPlugin } ;
54use bevy_diagnostic:: FrameCountPlugin ;
65use bevy_log:: LogPlugin ;
You can’t perform that action at this time.
0 commit comments