From 669e5a2120fdd2b287a276771415bb684fc73033 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Tue, 17 Sep 2024 20:36:04 -0400 Subject: [PATCH] fmt --- p2p/p2p-core/src/client/connector.rs | 4 +++- p2p/p2p-core/src/protocol/try_from.rs | 8 ++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/p2p/p2p-core/src/client/connector.rs b/p2p/p2p-core/src/client/connector.rs index 3c4a52e..553f5a4 100644 --- a/p2p/p2p-core/src/client/connector.rs +++ b/p2p/p2p-core/src/client/connector.rs @@ -40,7 +40,9 @@ impl Connector { /// Create a new connector from a handshaker. - pub const fn new(handshaker: HandShaker) -> Self { + pub const fn new( + handshaker: HandShaker, + ) -> Self { Self { handshaker } } } diff --git a/p2p/p2p-core/src/protocol/try_from.rs b/p2p/p2p-core/src/protocol/try_from.rs index 0c81a52..d3a7260 100644 --- a/p2p/p2p-core/src/protocol/try_from.rs +++ b/p2p/p2p-core/src/protocol/try_from.rs @@ -13,9 +13,7 @@ impl From for ProtocolMessage { match value { ProtocolRequest::GetObjects(val) => Self::GetObjectsRequest(val), ProtocolRequest::GetChain(val) => Self::ChainRequest(val), - ProtocolRequest::FluffyMissingTxs(val) => { - Self::FluffyMissingTransactionsRequest(val) - } + ProtocolRequest::FluffyMissingTxs(val) => Self::FluffyMissingTransactionsRequest(val), ProtocolRequest::GetTxPoolCompliment(val) => Self::GetTxPoolCompliment(val), ProtocolRequest::NewBlock(val) => Self::NewBlock(val), ProtocolRequest::NewFluffyBlock(val) => Self::NewFluffyBlock(val), @@ -31,9 +29,7 @@ impl TryFrom for ProtocolRequest { Ok(match value { ProtocolMessage::GetObjectsRequest(val) => Self::GetObjects(val), ProtocolMessage::ChainRequest(val) => Self::GetChain(val), - ProtocolMessage::FluffyMissingTransactionsRequest(val) => { - Self::FluffyMissingTxs(val) - } + ProtocolMessage::FluffyMissingTransactionsRequest(val) => Self::FluffyMissingTxs(val), ProtocolMessage::GetTxPoolCompliment(val) => Self::GetTxPoolCompliment(val), ProtocolMessage::NewBlock(val) => Self::NewBlock(val), ProtocolMessage::NewFluffyBlock(val) => Self::NewFluffyBlock(val),