Skip to content

Commit

Permalink
fix: feature-gate symbols to resolve dead-code warning (#3175)
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs authored Dec 13, 2022
1 parent d7363a5 commit 7dedc35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/identity/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Self {
msg: format!("encoding {key_type} key to Protobuf is unsupported"),
Expand Down
1 change: 1 addition & 0 deletions transports/quic/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub mod async_std;
pub mod tokio;

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

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

0 comments on commit 7dedc35

Please sign in to comment.