Skip to content

Commit

Permalink
Organize code
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Sep 12, 2024
1 parent daa5e4d commit bfb3757
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions rust_crate/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,12 @@ pub fn message_channel<T>() -> (MessageSender<T>, MessageReceiver<T>) {
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)
}

0 comments on commit bfb3757

Please sign in to comment.