*: Derive Debug and Clone(#2495)

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Nazar Mokrynskyi
2022-02-16 17:16:54 +02:00
committed by GitHub
parent 9f1114d8b9
commit 65cc8994a6
16 changed files with 44 additions and 9 deletions

View File

@ -149,6 +149,7 @@ pub enum GossipsubEvent {
/// A data structure for storing configuration for publishing messages. See [`MessageAuthenticity`]
/// for further details.
#[allow(clippy::large_enum_variant)]
#[derive(Clone)]
enum PublishConfig {
Signing {
keypair: Keypair,

View File

@ -40,6 +40,7 @@ const DEFAULT_MAX_TOPICS: usize = 300;
// store metrics.
const DEFAULT_MAX_NEVER_SUBSCRIBED_TOPICS: usize = 50;
#[derive(Debug, Clone)]
pub struct Config {
/// This provides an upper bound to the number of mesh topics we create metrics for. It
/// prevents unbounded labels being created in the metrics.

View File

@ -44,7 +44,7 @@ use unsigned_varint::codec;
pub(crate) const SIGNING_PREFIX: &[u8] = b"libp2p-pubsub:";
/// Implementation of [`InboundUpgrade`] and [`OutboundUpgrade`] for the Gossipsub protocol.
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct ProtocolConfig {
/// The Gossipsub protocol id to listen on.
protocol_ids: Vec<ProtocolId>,