diff --git a/.cargo/config.toml b/.cargo/config.toml index e55adcc9ed1..8c1349f4bc0 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,3 @@ [alias] # Temporary solution to have clippy config in a single place until https://github.com/rust-lang/rust-clippy/blob/master/doc/roadmap-2021.md#lintstoml-configuration is shipped. -custom-clippy = "clippy --workspace --all-features --all-targets -- -A clippy::type_complexity -A clippy::pedantic -W clippy::used_underscore_binding -W unreachable_pub -D warnings" +custom-clippy = "clippy --workspace --all-features --all-targets -- -A clippy::type_complexity -A clippy::pedantic -W clippy::used_underscore_binding -W unreachable_pub" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fe3a56f2cd..d5be55d43e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ concurrency: env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 # Fail cache download after 2 minutes. + RUSTFLAGS: '-Dwarnings' # Never tolerate warnings. jobs: test: diff --git a/identity/src/error.rs b/identity/src/error.rs index 4580c4422a1..71cd78fe1ea 100644 --- a/identity/src/error.rs +++ b/identity/src/error.rs @@ -77,11 +77,7 @@ impl DecodingError { } } - #[cfg(any( - all(feature = "rsa", not(target_arch = "wasm32")), - feature = "secp256k1", - feature = "ecdsa" - ))] + #[cfg(all(feature = "rsa", not(target_arch = "wasm32")))] pub(crate) fn encoding_unsupported(key_type: &'static str) -> Self { Self { msg: format!("encoding {key_type} key to Protobuf is unsupported"), @@ -111,7 +107,7 @@ pub struct SigningError { /// An error during encoding of key material. impl SigningError { - #[cfg(any(feature = "secp256k1", feature = "rsa"))] + #[cfg(all(feature = "rsa", not(target_arch = "wasm32")))] pub(crate) fn new(msg: S) -> Self { Self { msg: msg.to_string(), @@ -119,7 +115,7 @@ impl SigningError { } } - #[cfg(feature = "rsa")] + #[cfg(all(feature = "rsa", not(target_arch = "wasm32")))] pub(crate) fn source(self, source: impl Error + Send + Sync + 'static) -> Self { Self { source: Some(Box::new(source)), diff --git a/transports/webrtc/src/lib.rs b/transports/webrtc/src/lib.rs index 012796a6b69..f89d946228c 100644 --- a/transports/webrtc/src/lib.rs +++ b/transports/webrtc/src/lib.rs @@ -83,6 +83,7 @@ mod proto { #![allow(unreachable_pub)] include!("generated/mod.rs"); + #[cfg(feature = "tokio")] pub(crate) use self::webrtc::pb::{mod_Message::Flag, Message}; }