mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-24 07:11:38 +00:00
fix: feature-gate symbols to resolve dead-code warning (#3175)
This commit is contained in:
@ -82,6 +82,11 @@ impl DecodingError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(
|
||||||
|
all(feature = "rsa", not(target_arch = "wasm32")),
|
||||||
|
feature = "secp256k1",
|
||||||
|
feature = "ecdsa"
|
||||||
|
))]
|
||||||
pub(crate) fn encoding_unsupported(key_type: &'static str) -> Self {
|
pub(crate) fn encoding_unsupported(key_type: &'static str) -> Self {
|
||||||
Self {
|
Self {
|
||||||
msg: format!("encoding {key_type} key to Protobuf is unsupported"),
|
msg: format!("encoding {key_type} key to Protobuf is unsupported"),
|
||||||
|
@ -32,6 +32,7 @@ pub mod async_std;
|
|||||||
pub mod tokio;
|
pub mod tokio;
|
||||||
|
|
||||||
/// Size of the buffer for reading data 0x10000.
|
/// Size of the buffer for reading data 0x10000.
|
||||||
|
#[cfg(any(feature = "async-io", feature = "tokio"))]
|
||||||
const RECEIVE_BUFFER_SIZE: usize = 65536;
|
const RECEIVE_BUFFER_SIZE: usize = 65536;
|
||||||
|
|
||||||
/// Provider for non-blocking receiving and sending on a [`std::net::UdpSocket`]
|
/// Provider for non-blocking receiving and sending on a [`std::net::UdpSocket`]
|
||||||
|
Reference in New Issue
Block a user