From 41452a8c208e8d01e6e6791f2c102efc4a32ac62 Mon Sep 17 00:00:00 2001 From: Sludge <96552222+SludgePhD@users.noreply.github.com> Date: Thu, 14 Sep 2023 19:49:35 +0200 Subject: [PATCH] `#[derive(Clone)]` on `Component{Info,Descriptor}` --- crates/bevy_ecs/src/component.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs index 4bdc7572e02e0..b559b78dcb1b2 100644 --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -202,7 +202,7 @@ pub enum StorageType { } /// Stores metadata for a type of component or resource stored in a specific [`World`]. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ComponentInfo { id: ComponentId, descriptor: ComponentDescriptor, @@ -315,6 +315,7 @@ impl SparseSetIndex for ComponentId { } /// A value describing a component or resource, which may or may not correspond to a Rust type. +#[derive(Clone)] pub struct ComponentDescriptor { name: Cow<'static, str>, // SAFETY: This must remain private. It must match the statically known StorageType of the