mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Clippy fixes after Rust update
This commit is contained in:
parent
99fd1c84d9
commit
6c238b1617
@ -257,7 +257,7 @@ async fn register_tor_services(
|
||||
}
|
||||
})
|
||||
})
|
||||
.filter_map(|details| details)
|
||||
.flatten()
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let key = seed.derive_torv3_key();
|
||||
|
@ -274,11 +274,11 @@ impl State2 {
|
||||
// recover(encsign(a, S_b, d), sign(a, d), S_b) = s_b where d is a digest, (a,
|
||||
// A) is alice's keypair and (s_b, S_b) is bob's keypair.
|
||||
let tx_refund_encsig = self.a.encsign(self.S_b_bitcoin, tx_refund.digest());
|
||||
|
||||
let tx_cancel_sig = self.a.sign(tx_cancel.digest());
|
||||
|
||||
Message3 {
|
||||
tx_refund_encsig,
|
||||
tx_cancel_sig,
|
||||
tx_refund_encsig,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ impl State0 {
|
||||
let valid = CROSS_CURVE_PROOF_SYSTEM.verify(
|
||||
&msg.dleq_proof_s_a,
|
||||
(
|
||||
msg.S_a_bitcoin.clone().into(),
|
||||
msg.S_a_bitcoin.into(),
|
||||
msg.S_a_monero
|
||||
.point
|
||||
.decompress()
|
||||
|
@ -516,11 +516,7 @@ impl Header {
|
||||
pub fn username_bytes(&self) -> Option<&[u8]> {
|
||||
if let Some(ustar) = self.as_ustar() {
|
||||
Some(ustar.username_bytes())
|
||||
} else if let Some(gnu) = self.as_gnu() {
|
||||
Some(gnu.username_bytes())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else { self.as_gnu().map(|gnu| gnu.username_bytes()) }
|
||||
}
|
||||
|
||||
/// Sets the username inside this header.
|
||||
@ -558,10 +554,8 @@ impl Header {
|
||||
pub fn groupname_bytes(&self) -> Option<&[u8]> {
|
||||
if let Some(ustar) = self.as_ustar() {
|
||||
Some(ustar.groupname_bytes())
|
||||
} else if let Some(gnu) = self.as_gnu() {
|
||||
Some(gnu.groupname_bytes())
|
||||
} else {
|
||||
None
|
||||
self.as_gnu().map(|gnu| gnu.groupname_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user