Refactor usage of +
As we do for logical operators; put the `+` operator at the start of the line to make it more obvious and assist devs reading the code.
This commit is contained in:
parent
702e8bf82d
commit
d6462bae7b
|
@ -146,10 +146,9 @@ pub enum AddrV2 {
|
|||
impl Encodable for AddrV2 {
|
||||
fn consensus_encode<W: io::Write>(&self, e: W) -> Result<usize, io::Error> {
|
||||
fn encode_addr<W: io::Write>(mut e: W, network: u8, bytes: &[u8]) -> Result<usize, io::Error> {
|
||||
let len =
|
||||
network.consensus_encode(&mut e)? +
|
||||
VarInt(bytes.len() as u64).consensus_encode(&mut e)? +
|
||||
bytes.len();
|
||||
let len = network.consensus_encode(&mut e)?
|
||||
+ VarInt(bytes.len() as u64).consensus_encode(&mut e)?
|
||||
+ bytes.len();
|
||||
e.emit_slice(bytes)?;
|
||||
Ok(len)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue