Skip to content

Commit

Permalink
1.72 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Sep 1, 2023
1 parent e9d10d4 commit eed69bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/geometry/collider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ impl CollidingEntities {
pub struct ColliderDisabled;

/// Rigid body parent of the collider.
///
///
/// This is not meant to be set directly, this is controlled by bevy's hierarchy.
///
///
/// To change a colliders parent, set the [`Parent`] of the entity to a
/// different rigid body or remove the parent to leave the collider unattached.
#[derive(Component, Debug, Eq, PartialEq, Reflect)]
Expand All @@ -521,7 +521,7 @@ pub struct ColliderParent(pub(crate) Entity);

impl ColliderParent {
/// Gets the [`Entity`] ID of the rigid-body parent this collider is attached to.
///
///
/// This may be the same entity as the collider.
pub fn get(&self) -> Entity {
self.0
Expand Down
8 changes: 6 additions & 2 deletions src/plugin/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,9 @@ pub fn init_async_scene_colliders(
mesh_handles: Query<(&Name, &Handle<Mesh>)>,
) {
let Some(meshes) = meshes else { return };
let Some(scene_spawner) = scene_spawner else { return };
let Some(scene_spawner) = scene_spawner else {
return;
};
for (scene_entity, scene_instance, async_collider) in async_colliders.iter() {
if scene_spawner.instance_is_ready(**scene_instance) {
for child_entity in children.iter_descendants(scene_entity) {
Expand Down Expand Up @@ -2058,7 +2060,9 @@ mod tests {
break;
}

let Ok(parent) = parents.get(entity) else { break };
let Ok(parent) = parents.get(entity) else {
break;
};
entity = parent.get();
}

Expand Down

0 comments on commit eed69bf

Please sign in to comment.