Skip to content

Commit 8cbc774

Browse files
committed
fmt
1 parent df06379 commit 8cbc774

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

crates/bevy_mod_scripting_bindings/src/reference.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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)

crates/bevy_mod_scripting_functions/src/core.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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

crates/testing_crates/test_utils/src/test_data.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::{alloc::Layout, collections::HashMap};
22

3-
43
use bevy_app::{App, ScheduleRunnerPlugin, TaskPoolPlugin};
54
use bevy_diagnostic::FrameCountPlugin;
65
use bevy_log::LogPlugin;

0 commit comments

Comments
 (0)