aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-10-12 13:33:42 +0200
committerAlex Auvolat <alex@adnab.me>2021-10-12 13:33:42 +0200
commit50806b54b715a1d4450d037191c6cc812edb8e59 (patch)
tree0c51540d333a84b8054e1dcfc7047622655ba094
parent6c8dd95d204e73c61b14002740eef5d2dba87a2b (diff)
downloadnetapp-50806b54b715a1d4450d037191c6cc812edb8e59.tar.gz
netapp-50806b54b715a1d4450d037191c6cc812edb8e59.zip
fix cargo fmt style
-rw-r--r--src/netapp.rs8
-rw-r--r--src/peering/basalt.rs2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/netapp.rs b/src/netapp.rs
index 86f14fe..e49f599 100644
--- a/src/netapp.rs
+++ b/src/netapp.rs
@@ -27,9 +27,11 @@ type DynMsg = Box<dyn Any + Send + Sync + 'static>;
type OnConnectHandler = Box<dyn Fn(NodeID, SocketAddr, bool) + Send + Sync>;
type OnDisconnectHandler = Box<dyn Fn(NodeID, bool) + Send + Sync>;
-pub(crate) type LocalHandler = Box<dyn Fn(DynMsg) -> Pin<Box<dyn Future<Output = DynMsg> + Sync + Send>> + Sync + Send>;
+pub(crate) type LocalHandler =
+ Box<dyn Fn(DynMsg) -> Pin<Box<dyn Future<Output = DynMsg> + Sync + Send>> + Sync + Send>;
pub(crate) type NetHandler = Box<
- dyn Fn(NodeID, Bytes) -> Pin<Box<dyn Future<Output = Vec<u8>> + Sync + Send>> + Sync + Send>;
+ dyn Fn(NodeID, Bytes) -> Pin<Box<dyn Future<Output = Vec<u8>> + Sync + Send>> + Sync + Send,
+>;
pub(crate) struct Handler {
pub(crate) local_handler: LocalHandler,
@@ -132,7 +134,7 @@ impl NetApp {
let netapp2 = netapp.clone();
netapp.add_msg_handler::<HelloMessage, _, _>(move |from: NodeID, msg: HelloMessage| {
netapp2.handle_hello_message(from, msg);
- async { }
+ async {}
});
netapp
diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs
index a53571e..3109e72 100644
--- a/src/peering/basalt.rs
+++ b/src/peering/basalt.rs
@@ -290,7 +290,7 @@ impl Basalt {
let basalt2 = basalt.clone();
netapp.add_msg_handler::<PushMessage, _, _>(move |_from: NodeID, push_msg: PushMessage| {
basalt2.handle_peer_list(&push_msg.peers[..]);
- async move { }
+ async move {}
});
basalt