diff --git a/rust_crate/src/channel.rs b/rust_crate/src/channel.rs index eeef4c69..995a2447 100644 --- a/rust_crate/src/channel.rs +++ b/rust_crate/src/channel.rs @@ -97,15 +97,12 @@ pub fn message_channel() -> (MessageSender, MessageReceiver) { active_receiver_id: 0, // Start with receiver ID 0 })); - let receiver = MessageReceiver { + let sender = MessageSender { inner: channel.clone(), + }; + let receiver = MessageReceiver { + inner: channel, id: 0, }; - - ( - MessageSender { - inner: channel.clone(), - }, - receiver, - ) + (sender, receiver) }