mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
refactor(gossipsub): remove unnecessary trait bounds (#3317)
Trait bounds on struct declarations should be avoided as much as possible because they creep into every reference of the type. To supply default type parameters, we don't need the trait bounds.
This commit is contained in:
@ -211,10 +211,7 @@ impl From<MessageAuthenticity> for PublishConfig {
|
||||
///
|
||||
/// The TopicSubscriptionFilter allows applications to implement specific filters on topics to
|
||||
/// prevent unwanted messages being propagated and evaluated.
|
||||
pub struct Gossipsub<
|
||||
D: DataTransform = IdentityTransform,
|
||||
F: TopicSubscriptionFilter = AllowAllSubscriptionFilter,
|
||||
> {
|
||||
pub struct Gossipsub<D = IdentityTransform, F = AllowAllSubscriptionFilter> {
|
||||
/// Configuration providing gossipsub performance parameters.
|
||||
config: GossipsubConfig,
|
||||
|
||||
|
Reference in New Issue
Block a user