Skip to content

Commit c6984dd

Browse files
ci: do not tolerate rustc warnings in any job
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.
1 parent 9946890 commit c6984dd

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[alias]
22
# 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.
3-
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"
3+
custom-clippy = "clippy --workspace --all-features --all-targets -- -A clippy::type_complexity -A clippy::pedantic -W clippy::used_underscore_binding -W unreachable_pub"

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ concurrency:
1212

1313
env:
1414
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 # Fail cache download after 2 minutes.
15+
RUSTFLAGS: '-Dwarnings' # Never tolerate warnings.
1516

1617
jobs:
1718
test:

identity/src/error.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ impl DecodingError {
7777
}
7878
}
7979

80-
#[cfg(any(
81-
all(feature = "rsa", not(target_arch = "wasm32")),
82-
feature = "secp256k1",
83-
feature = "ecdsa"
84-
))]
80+
#[cfg(all(feature = "rsa", not(target_arch = "wasm32")))]
8581
pub(crate) fn encoding_unsupported(key_type: &'static str) -> Self {
8682
Self {
8783
msg: format!("encoding {key_type} key to Protobuf is unsupported"),
@@ -111,15 +107,15 @@ pub struct SigningError {
111107

112108
/// An error during encoding of key material.
113109
impl SigningError {
114-
#[cfg(any(feature = "secp256k1", feature = "rsa"))]
110+
#[cfg(all(feature = "rsa", not(target_arch = "wasm32")))]
115111
pub(crate) fn new<S: ToString>(msg: S) -> Self {
116112
Self {
117113
msg: msg.to_string(),
118114
source: None,
119115
}
120116
}
121117

122-
#[cfg(feature = "rsa")]
118+
#[cfg(all(feature = "rsa", not(target_arch = "wasm32")))]
123119
pub(crate) fn source(self, source: impl Error + Send + Sync + 'static) -> Self {
124120
Self {
125121
source: Some(Box::new(source)),

transports/webrtc/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
mod proto {
8484
#![allow(unreachable_pub)]
8585
include!("generated/mod.rs");
86+
#[cfg(feature = "tokio")]
8687
pub(crate) use self::webrtc::pb::{mod_Message::Flag, Message};
8788
}
8889

0 commit comments

Comments
 (0)