From f7608f5b9c1ad6554eb1786ff5c7b7f4287040cb Mon Sep 17 00:00:00 2001 From: antiochp <30642645+antiochp@users.noreply.github.com> Date: Fri, 16 Nov 2018 14:34:05 +0000 Subject: [PATCH] rustfmt --- p2p/src/conn.rs | 4 +++- p2p/src/protocol.rs | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/p2p/src/conn.rs b/p2p/src/conn.rs index db029d693..3157669c9 100644 --- a/p2p/src/conn.rs +++ b/p2p/src/conn.rs @@ -261,7 +261,9 @@ fn poll( received_bytes.inc(MsgHeader::LEN as u64 + msg.header.msg_len); } - if let Some(Some(resp)) = try_break!(error_tx, handler.consume(msg, &mut writer, received)) { + if let Some(Some(resp)) = + try_break!(error_tx, handler.consume(msg, &mut writer, received)) + { try_break!(error_tx, resp.write(sent_bytes.clone())); } } diff --git a/p2p/src/protocol.rs b/p2p/src/protocol.rs index 8dd644556..de9b7174a 100644 --- a/p2p/src/protocol.rs +++ b/p2p/src/protocol.rs @@ -185,9 +185,11 @@ impl MessageHandler for Protocol { let headers = adapter.locate_headers(loc.hashes); // serialize and send all the headers over - Ok(Some( - Response::new(Type::Headers, Headers { headers }, writer), - )) + Ok(Some(Response::new( + Type::Headers, + Headers { headers }, + writer, + ))) } // "header first" block propagation - if we have not yet seen this block