mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-07 05:38:07 -05: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<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let key = seed.derive_torv3_key();
|
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,
|
// 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.
|
// 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_refund_encsig = self.a.encsign(self.S_b_bitcoin, tx_refund.digest());
|
||||||
|
|
||||||
let tx_cancel_sig = self.a.sign(tx_cancel.digest());
|
let tx_cancel_sig = self.a.sign(tx_cancel.digest());
|
||||||
|
|
||||||
Message3 {
|
Message3 {
|
||||||
tx_refund_encsig,
|
|
||||||
tx_cancel_sig,
|
tx_cancel_sig,
|
||||||
|
tx_refund_encsig,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ impl State0 {
|
|||||||
let valid = CROSS_CURVE_PROOF_SYSTEM.verify(
|
let valid = CROSS_CURVE_PROOF_SYSTEM.verify(
|
||||||
&msg.dleq_proof_s_a,
|
&msg.dleq_proof_s_a,
|
||||||
(
|
(
|
||||||
msg.S_a_bitcoin.clone().into(),
|
msg.S_a_bitcoin.into(),
|
||||||
msg.S_a_monero
|
msg.S_a_monero
|
||||||
.point
|
.point
|
||||||
.decompress()
|
.decompress()
|
||||||
|
@ -516,11 +516,7 @@ impl Header {
|
|||||||
pub fn username_bytes(&self) -> Option<&[u8]> {
|
pub fn username_bytes(&self) -> Option<&[u8]> {
|
||||||
if let Some(ustar) = self.as_ustar() {
|
if let Some(ustar) = self.as_ustar() {
|
||||||
Some(ustar.username_bytes())
|
Some(ustar.username_bytes())
|
||||||
} else if let Some(gnu) = self.as_gnu() {
|
} else { self.as_gnu().map(|gnu| gnu.username_bytes()) }
|
||||||
Some(gnu.username_bytes())
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the username inside this header.
|
/// Sets the username inside this header.
|
||||||
@ -558,10 +554,8 @@ impl Header {
|
|||||||
pub fn groupname_bytes(&self) -> Option<&[u8]> {
|
pub fn groupname_bytes(&self) -> Option<&[u8]> {
|
||||||
if let Some(ustar) = self.as_ustar() {
|
if let Some(ustar) = self.as_ustar() {
|
||||||
Some(ustar.groupname_bytes())
|
Some(ustar.groupname_bytes())
|
||||||
} else if let Some(gnu) = self.as_gnu() {
|
|
||||||
Some(gnu.groupname_bytes())
|
|
||||||
} else {
|
} else {
|
||||||
None
|
self.as_gnu().map(|gnu| gnu.groupname_bytes())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user