aboutsummaryrefslogtreecommitdiff
path: root/src/netapp.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-21 19:05:51 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-21 19:05:51 +0200
commit44bbc1c00c2532e08dff0d4a547b0a707e89f32d (patch)
treea6c021ae50370b3c065e3485ef1dd06052a962c9 /src/netapp.rs
parent26989bba1409bfc093e58ef98e75885b10ad7c1c (diff)
downloadnetapp-44bbc1c00c2532e08dff0d4a547b0a707e89f32d.tar.gz
netapp-44bbc1c00c2532e08dff0d4a547b0a707e89f32d.zip
Rename AutoSerialize into SimpleMessage and refactor a bit
Diffstat (limited to 'src/netapp.rs')
-rw-r--r--src/netapp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/netapp.rs b/src/netapp.rs
index dd22d90..8365de0 100644
--- a/src/netapp.rs
+++ b/src/netapp.rs
@@ -38,7 +38,7 @@ pub(crate) struct HelloMessage {
pub server_port: u16,
}
-impl AutoSerialize for HelloMessage {}
+impl SimpleMessage for HelloMessage {}
impl Message for HelloMessage {
type Response = ();
@@ -399,7 +399,7 @@ impl NetApp {
hello_endpoint
.call(
&conn.peer_id,
- &HelloMessage {
+ HelloMessage {
server_addr,
server_port,
},
@@ -434,7 +434,7 @@ impl NetApp {
#[async_trait]
impl EndpointHandler<HelloMessage> for NetApp {
- async fn handle(self: &Arc<Self>, msg: &HelloMessage, from: NodeID) {
+ async fn handle(self: &Arc<Self>, msg: HelloMessage, from: NodeID) {
debug!("Hello from {:?}: {:?}", hex::encode(&from[..8]), msg);
if let Some(h) = self.on_connected_handler.load().as_ref() {
if let Some(c) = self.server_conns.read().unwrap().get(&from) {