Skip to content

Commit

Permalink
[style] Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-lua committed Sep 28, 2024
1 parent c3c6484 commit 32187d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/reflect/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub struct ReflectComponentFns {
/// Function pointer implementing [`ReflectComponent::copy()`].
pub copy: fn(&World, &mut World, Entity, Entity, &TypeRegistry),
/// Function pointer implementing [`ReflectComponent::register_component()`].
pub register_component: fn(&mut World) -> ComponentId
pub register_component: fn(&mut World) -> ComponentId,
}

impl ReflectComponentFns {
Expand Down Expand Up @@ -312,7 +312,7 @@ impl<C: Component + Reflect + TypePath> FromType<C> for ReflectComponent {
},
register_component: |world: &mut World| -> ComponentId {
world.register_component::<C>()
}
},
})
}
}
9 changes: 6 additions & 3 deletions crates/bevy_ecs/src/reflect/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
//! See the module doc for [`crate::reflect::component`].

use crate::{
change_detection::Mut, component::ComponentId, system::Resource, world::{unsafe_world_cell::UnsafeWorldCell, World}
change_detection::Mut,
component::ComponentId,
system::Resource,
world::{unsafe_world_cell::UnsafeWorldCell, World},
};
use bevy_reflect::{FromReflect, FromType, PartialReflect, Reflect, TypePath, TypeRegistry};

Expand Down Expand Up @@ -58,7 +61,7 @@ pub struct ReflectResourceFns {
/// Function pointer implementing [`ReflectResource::copy()`].
pub copy: fn(&World, &mut World, &TypeRegistry),
/// Function pointer implementing [`ReflectResource::register_resource()`].
pub register_resource: fn(&mut World) -> ComponentId
pub register_resource: fn(&mut World) -> ComponentId,
}

impl ReflectResourceFns {
Expand Down Expand Up @@ -225,7 +228,7 @@ impl<R: Resource + FromReflect + TypePath> FromType<R> for ReflectResource {

register_resource: |world: &mut World| -> ComponentId {
world.register_resource::<R>()
}
},
})
}
}

0 comments on commit 32187d1

Please sign in to comment.