fix: feature-gate symbols to resolve dead-code warning (#3175)

This commit is contained in:
João Oliveira
2022-12-13 01:33:00 +00:00
committed by GitHub
parent d7363a53d3
commit 7dedc351d7
2 changed files with 6 additions and 0 deletions

View File

@ -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"),