Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9c7ca29a authored by WILLIAMS Harvey's avatar WILLIAMS Harvey
Browse files

Clippy warning gone

parent e31ee2f7
No related branches found
No related tags found
No related merge requests found
use rust_networking_examples::Network;
mod application;
mod net;
use net::Net;
......@@ -15,6 +14,6 @@ async fn main() {
net_a.send("b", "Hello world!".as_bytes().to_vec());
while let Some((from, msg)) = recv_b.recv().await {
println!("{}, {:?}", from, msg);
println!("Received {:?} from {}", String::from_utf8(msg), from);
}
}
......@@ -67,10 +67,13 @@ impl DispatchHandle {
}
}
/// Represents a collection of channels that we can dispatch messages through
type DispatchChannels = Vec<mpsc::Sender<(String, Vec<u8>)>>;
/// The dispatch actor itself, that performs message routing.
#[derive(Default)]
struct Actor {
senders: HashMap<String, Vec<mpsc::Sender<(String, Vec<u8>)>>>
senders: HashMap<String, DispatchChannels>
}
impl Actor {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment