protocols/kad: Remove deprecated set_protocol_name() (#2866)

This commit is contained in:
Dmitry Markin
2022-09-15 16:30:32 +03:00
committed by GitHub
parent 72bade1799
commit 5906140d38
8 changed files with 20 additions and 22 deletions

View File

@ -159,13 +159,6 @@ impl KademliaProtocolConfig {
self.protocol_names = names;
}
/// Sets single protocol name used on the wire. Can be used to create incompatibilities
/// between networks on purpose.
#[deprecated(since = "0.40.0", note = "use `set_protocol_names()` instead")]
pub fn set_protocol_name(&mut self, name: impl Into<Cow<'static, [u8]>>) {
self.set_protocol_names(std::iter::once(name.into()).collect());
}
/// Modifies the maximum allowed size of a single Kademlia packet.
pub fn set_max_packet_size(&mut self, size: usize) {
self.max_packet_size = size;