Skip to content

Commit

Permalink
ci: do not tolerate rustc warnings in any job
Browse files Browse the repository at this point in the history
Previously, only the clippy job was denying warnings. We have many other CI jobs that compile our library in all sorts of configurations. All of them should be free of warnings.

Pull-Request: #4384.
  • Loading branch information
thomaseizinger committed Aug 25, 2023
1 parent 9946890 commit c6984dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -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"
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:

env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 # Fail cache download after 2 minutes.
RUSTFLAGS: '-Dwarnings' # Never tolerate warnings.

jobs:
test:
Expand Down
10 changes: 3 additions & 7 deletions identity/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -111,15 +107,15 @@ 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<S: ToString>(msg: S) -> Self {
Self {
msg: msg.to_string(),
source: None,
}
}

#[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)),
Expand Down
1 change: 1 addition & 0 deletions transports/webrtc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}

Expand Down

0 comments on commit c6984dd

Please sign in to comment.