mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-02 14:56:10 -04:00
Remove overzealous clippy overrides
We have overridden a number of clippy warnings such as "large enum variant". Considering that we have a number of issues with the stack size in CI, it is more prudent to follow clippy's advice and box larger items so that the enum does not take larger space. Do note that an instance of the enum always takes as much space as its largest variant.
This commit is contained in:
parent
cdf2800fa5
commit
2a778f5644
15 changed files with 103 additions and 71 deletions
|
@ -53,15 +53,15 @@ pub fn new_swarm(
|
|||
Ok(swarm)
|
||||
}
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Debug)]
|
||||
pub enum OutEvent {
|
||||
ConnectionEstablished(PeerId),
|
||||
// TODO (Franck): Change this to get both amounts so parties can verify the amounts are
|
||||
// expected early on.
|
||||
Request(amounts::OutEvent), // Not-uniform with Bob on purpose, ready for adding Xmr event.
|
||||
Request(Box<amounts::OutEvent>), /* Not-uniform with Bob on purpose, ready for adding Xmr
|
||||
* event. */
|
||||
Message0 {
|
||||
msg: bob::Message0,
|
||||
msg: Box<bob::Message0>,
|
||||
channel: ResponseChannel<AliceToBob>,
|
||||
},
|
||||
Message1 {
|
||||
|
@ -87,14 +87,17 @@ impl From<peer_tracker::OutEvent> for OutEvent {
|
|||
|
||||
impl From<amounts::OutEvent> for OutEvent {
|
||||
fn from(event: amounts::OutEvent) -> Self {
|
||||
OutEvent::Request(event)
|
||||
OutEvent::Request(Box::new(event))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<message0::OutEvent> for OutEvent {
|
||||
fn from(event: message0::OutEvent) -> Self {
|
||||
match event {
|
||||
message0::OutEvent::Msg { channel, msg } => OutEvent::Message0 { msg, channel },
|
||||
message0::OutEvent::Msg { channel, msg } => OutEvent::Message0 {
|
||||
msg: Box::new(msg),
|
||||
channel,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue