Skip to content

Commit 7dedc35

Browse files
authored
fix: feature-gate symbols to resolve dead-code warning (#3175)
1 parent d7363a5 commit 7dedc35

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

core/src/identity/error.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ impl DecodingError {
8282
}
8383
}
8484

85+
#[cfg(any(
86+
all(feature = "rsa", not(target_arch = "wasm32")),
87+
feature = "secp256k1",
88+
feature = "ecdsa"
89+
))]
8590
pub(crate) fn encoding_unsupported(key_type: &'static str) -> Self {
8691
Self {
8792
msg: format!("encoding {key_type} key to Protobuf is unsupported"),

transports/quic/src/provider.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub mod async_std;
3232
pub mod tokio;
3333

3434
/// Size of the buffer for reading data 0x10000.
35+
#[cfg(any(feature = "async-io", feature = "tokio"))]
3536
const RECEIVE_BUFFER_SIZE: usize = 65536;
3637

3738
/// Provider for non-blocking receiving and sending on a [`std::net::UdpSocket`]

0 commit comments

Comments
 (0)