mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
Trivial formatting fixes
This commit is contained in:
parent
e4ca924b47
commit
a37e2b99fb
2 changed files with 11 additions and 11 deletions
|
@ -202,7 +202,7 @@ impl Connection {
|
||||||
|
|
||||||
/// Utility function to send any Writeable. Handles adding the header and
|
/// Utility function to send any Writeable. Handles adding the header and
|
||||||
/// serialization.
|
/// serialization.
|
||||||
pub fn send_msg<W: ser::Writeable> (&self, t: Type, body: &W) -> Result<(), Error> {
|
pub fn send_msg<W: ser::Writeable>(&self, t: Type, body: &W) -> Result<(), Error> {
|
||||||
|
|
||||||
let mut body_data = vec![];
|
let mut body_data = vec![];
|
||||||
try!(ser::serialize(&mut body_data, body));
|
try!(ser::serialize(&mut body_data, body));
|
||||||
|
@ -283,11 +283,11 @@ impl TimeoutConnection {
|
||||||
/// Sends a request and registers a timer on the provided message type and
|
/// Sends a request and registers a timer on the provided message type and
|
||||||
/// optionally the hash of the sent data.
|
/// optionally the hash of the sent data.
|
||||||
pub fn send_request<W: ser::Writeable>(&self,
|
pub fn send_request<W: ser::Writeable>(&self,
|
||||||
t: Type,
|
t: Type,
|
||||||
rt: Type,
|
rt: Type,
|
||||||
body: &W,
|
body: &W,
|
||||||
expect_h: Option<(Hash)>)
|
expect_h: Option<(Hash)>)
|
||||||
-> Result<(), Error> {
|
-> Result<(), Error> {
|
||||||
let sent = try!(self.underlying.send_msg(t, body));
|
let sent = try!(self.underlying.send_msg(t, body));
|
||||||
|
|
||||||
let mut expects = self.expected_responses.lock().unwrap();
|
let mut expects = self.expected_responses.lock().unwrap();
|
||||||
|
|
|
@ -111,11 +111,11 @@ impl ProtocolV1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn send_request<W: ser::Writeable>(&self,
|
fn send_request<W: ser::Writeable>(&self,
|
||||||
t: Type,
|
t: Type,
|
||||||
rt: Type,
|
rt: Type,
|
||||||
body: &W,
|
body: &W,
|
||||||
expect_resp: Option<Hash>)
|
expect_resp: Option<Hash>)
|
||||||
-> Result<(), Error> {
|
-> Result<(), Error> {
|
||||||
self.conn.borrow().send_request(t, rt, body, expect_resp)
|
self.conn.borrow().send_request(t, rt, body, expect_resp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue