From 877a1e940e41c5f10665139c37cfb815c2390bd9 Mon Sep 17 00:00:00 2001 From: Jacob-JB Date: Wed, 26 Jun 2024 15:08:00 +1000 Subject: [PATCH] MessageId unbounded Copy impl --- crates/nevy_messaging/src/serialize.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/nevy_messaging/src/serialize.rs b/crates/nevy_messaging/src/serialize.rs index c1fa4b3..d373415 100644 --- a/crates/nevy_messaging/src/serialize.rs +++ b/crates/nevy_messaging/src/serialize.rs @@ -60,7 +60,7 @@ impl MessageIdBuilder /// the message id for a message `T`, /// assigned by [MessageSerializationPlugin] and stored as a resource -#[derive(Copy, Resource)] +#[derive(Resource)] pub struct MessageId { _p: PhantomData<(C, T)>, message_id: u16, @@ -75,6 +75,8 @@ impl Clone for MessageId { } } +impl Copy for MessageId {} + /// wraps a stream id and ensures that the message protocol isn't broken pub struct MessageStreamState { _p: PhantomData,