Skip to content

Commit

Permalink
remove Default trait implementation for ProtocolConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
drHuangMHT committed Dec 30, 2024
1 parent f45a56a commit 42b4e3b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions protocols/kad/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//! to poll the underlying transport for incoming messages, and the `Sink` component
//! is used to send messages to remote peers.
use std::{io, iter, marker::PhantomData, time::Duration};
use std::{io, marker::PhantomData, time::Duration};

use asynchronous_codec::{Decoder, Encoder, Framed};
use bytes::BytesMut;
Expand Down Expand Up @@ -167,18 +167,6 @@ impl ProtocolConfig {
}
}

impl Default for ProtocolConfig {
/// Returns the default configuration.
///
/// Deprecated: use `ProtocolConfig::new` instead.
fn default() -> Self {
ProtocolConfig {
protocol_names: iter::once(DEFAULT_PROTO_NAME).collect(),
max_packet_size: DEFAULT_MAX_PACKET_SIZE,
}
}
}

impl UpgradeInfo for ProtocolConfig {
type Info = StreamProtocol;
type InfoIter = std::vec::IntoIter<Self::Info>;
Expand Down

0 comments on commit 42b4e3b

Please sign in to comment.