Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdallas committed Jun 13, 2019
1 parent c81baf1 commit 92c361f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions libwallet/src/slate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ impl Writeable for Slate {
pd.public_blind_excess.write(writer)?;
pd.public_nonce.write(writer)?;


match pd.part_sig {
None => writer.write_u8(0)?,
Some(sig) => {
Expand Down Expand Up @@ -887,10 +886,12 @@ impl Readable for Slate {
let part_sig: Option<Signature> = match reader.read_u8()? as usize {
0 => None,
secp::constants::AGG_SIGNATURE_SIZE => {
let bytes = reader.read_fixed_bytes(secp::constants::AGG_SIGNATURE_SIZE as usize)?;
let sig = Signature::from_compact(&s, &bytes).map_err(|_| ser::Error::CorruptedData)?;
Some(sig)
},
let bytes =
reader.read_fixed_bytes(secp::constants::AGG_SIGNATURE_SIZE as usize)?;
let sig = Signature::from_compact(&s, &bytes)
.map_err(|_| ser::Error::CorruptedData)?;
Some(sig)
}
_ => return Err(ser::Error::CountError),
};

Expand All @@ -907,10 +908,12 @@ impl Readable for Slate {
let message_sig: Option<Signature> = match reader.read_u8()? as usize {
0 => None,
secp::constants::AGG_SIGNATURE_SIZE => {
let bytes = reader.read_fixed_bytes(secp::constants::AGG_SIGNATURE_SIZE as usize)?;
let sig = Signature::from_compact(&s, &bytes).map_err(|_| ser::Error::CorruptedData)?;
let bytes =
reader.read_fixed_bytes(secp::constants::AGG_SIGNATURE_SIZE as usize)?;
let sig = Signature::from_compact(&s, &bytes)
.map_err(|_| ser::Error::CorruptedData)?;
Some(sig)
},
}
_ => return Err(ser::Error::CountError),
};

Expand Down

0 comments on commit 92c361f

Please sign in to comment.