From 32187d1f4a837e13582900ee2af338c24a09d749 Mon Sep 17 00:00:00 2001 From: pablo-lua Date: Sat, 28 Sep 2024 12:25:56 -0300 Subject: [PATCH] [style] Cargo fmt --- crates/bevy_ecs/src/reflect/component.rs | 4 ++-- crates/bevy_ecs/src/reflect/resource.rs | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/bevy_ecs/src/reflect/component.rs b/crates/bevy_ecs/src/reflect/component.rs index b5c692636424f..a735aa75321c9 100644 --- a/crates/bevy_ecs/src/reflect/component.rs +++ b/crates/bevy_ecs/src/reflect/component.rs @@ -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 { @@ -312,7 +312,7 @@ impl FromType for ReflectComponent { }, register_component: |world: &mut World| -> ComponentId { world.register_component::() - } + }, }) } } diff --git a/crates/bevy_ecs/src/reflect/resource.rs b/crates/bevy_ecs/src/reflect/resource.rs index 2bac137a7c729..f9da7adc7c9a2 100644 --- a/crates/bevy_ecs/src/reflect/resource.rs +++ b/crates/bevy_ecs/src/reflect/resource.rs @@ -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}; @@ -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 { @@ -225,7 +228,7 @@ impl FromType for ReflectResource { register_resource: |world: &mut World| -> ComponentId { world.register_resource::() - } + }, }) } }