Allow large enum variant lint

The docs say one needs to measure the impact of this before taking
action. We didn't measure anything. Let's not take any action.
This commit is contained in:
Thomas Eizinger 2021-07-05 19:10:16 +10:00
parent e163942850
commit b4fafeba6b
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
4 changed files with 6 additions and 5 deletions

View File

@ -172,7 +172,7 @@ where
let _ = responder.respond(wallet_snapshot);
}
SwarmEvent::Behaviour(OutEvent::SwapSetupCompleted{peer_id, swap_id, state3}) => {
let _ = self.handle_execution_setup_done(peer_id, swap_id, *state3).await;
let _ = self.handle_execution_setup_done(peer_id, swap_id, state3).await;
}
SwarmEvent::Behaviour(OutEvent::SwapDeclined { peer, error }) => {
tracing::warn!(%peer, "Ignoring spot price request because: {}", error);

View File

@ -34,6 +34,7 @@ pub mod behaviour {
use libp2p::{NetworkBehaviour, PeerId};
use uuid::Uuid;
#[allow(clippy::large_enum_variant)]
#[derive(Debug)]
pub enum OutEvent {
SwapSetupInitiated {
@ -42,7 +43,7 @@ pub mod behaviour {
SwapSetupCompleted {
peer_id: PeerId,
swap_id: Uuid,
state3: Box<State3>,
state3: State3,
},
SwapDeclined {
peer: PeerId,
@ -57,7 +58,7 @@ pub mod behaviour {
id: RequestId,
},
EncryptedSignatureReceived {
msg: Box<encrypted_signature::Request>,
msg: encrypted_signature::Request,
channel: ResponseChannel<()>,
peer: PeerId,
},

View File

@ -52,7 +52,7 @@ impl From<(PeerId, Message)> for asb::OutEvent {
Message::Request {
request, channel, ..
} => Self::EncryptedSignatureReceived {
msg: Box::new(request),
msg: request,
channel,
peer,
},

View File

@ -96,7 +96,7 @@ impl From<OutEvent> for asb::OutEvent {
} => asb::OutEvent::SwapSetupCompleted {
peer_id: bob_peer_id,
swap_id,
state3: Box::new(state3),
state3,
},
OutEvent::Error { peer_id, error } => asb::OutEvent::Failure {
peer: peer_id,