diff --git a/mycelium/src/message.rs b/mycelium/src/message.rs index a5b93c3..776bef1 100644 --- a/mycelium/src/message.rs +++ b/mycelium/src/message.rs @@ -85,11 +85,7 @@ pub type Checksum = [u8; MESSAGE_CHECKSUM_LENGTH]; /// Response type when pushing a message. pub type MessagePushResponse = (MessageId, Option>>); -#[derive(Clone)] -pub struct MessageStack -where - M: Clone, -{ +pub struct MessageStack { // The DataPlane is wrappen in a Mutex since it does not implement Sync. data_plane: Arc>>, inbox: Arc>, @@ -1055,6 +1051,18 @@ where } } +impl Clone for MessageStack { + fn clone(&self) -> Self { + Self { + data_plane: self.data_plane.clone(), + inbox: self.inbox.clone(), + outbox: self.outbox.clone(), + subscriber: self.subscriber.clone(), + reply_subscribers: self.reply_subscribers.clone(), + } + } +} + #[derive(Serialize)] #[serde(rename_all = "camelCase")] pub struct MessageInfo {