mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Simply Coordinator/Processors::send by accepting impl Into *Message
This commit is contained in:
@@ -30,10 +30,10 @@ impl MemProcessors {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl Processors for MemProcessors {
|
||||
async fn send(&self, network: NetworkId, msg: CoordinatorMessage) {
|
||||
async fn send(&self, network: NetworkId, msg: impl Send + Into<CoordinatorMessage>) {
|
||||
let mut processors = self.0.write().await;
|
||||
let processor = processors.entry(network).or_insert_with(VecDeque::new);
|
||||
processor.push_back(msg);
|
||||
processor.push_back(msg.into());
|
||||
}
|
||||
async fn recv(&mut self, _: NetworkId) -> Message {
|
||||
todo!()
|
||||
|
||||
Reference in New Issue
Block a user