diff --git a/crates/cli/src/telemetry.rs b/crates/cli/src/telemetry.rs index 4e0d29536..283b9018d 100644 --- a/crates/cli/src/telemetry.rs +++ b/crates/cli/src/telemetry.rs @@ -191,7 +191,6 @@ fn stdout_metric_reader() -> PeriodicReader>, std::convert::Infallible>>; -#[expect(clippy::needless_pass_by_value)] fn prometheus_service_fn(_req: T) -> PromServiceFuture { let response = if let Some(exporter) = PROMETHEUS_EXPORTER.get() { // We'll need some space for this, so we preallocate a bit diff --git a/crates/config/src/sections/upstream_oauth2.rs b/crates/config/src/sections/upstream_oauth2.rs index 92e0ba7e9..5e87927f8 100644 --- a/crates/config/src/sections/upstream_oauth2.rs +++ b/crates/config/src/sections/upstream_oauth2.rs @@ -450,12 +450,10 @@ fn is_default_true(value: &bool) -> bool { *value } -#[expect(clippy::ref_option)] fn is_signed_response_alg_default(signed_response_alg: &JsonWebSignatureAlg) -> bool { *signed_response_alg == signed_response_alg_default() } -#[expect(clippy::unnecessary_wraps)] fn signed_response_alg_default() -> JsonWebSignatureAlg { JsonWebSignatureAlg::Rs256 } diff --git a/crates/handlers/src/compat/login.rs b/crates/handlers/src/compat/login.rs index 2f5f3a760..76b4074a5 100644 --- a/crates/handlers/src/compat/login.rs +++ b/crates/handlers/src/compat/login.rs @@ -2518,7 +2518,6 @@ mod tests { }; // Keep logging in to add more sessions, up to the `hard_limit`. - #[expect(clippy::range_plus_one)] for _ in 0..session_limit_config.hard_limit.get() { let device_id = do_login().await; login_device_ids.push(device_id); diff --git a/crates/handlers/src/lib.rs b/crates/handlers/src/lib.rs index 2277bb068..ba34577d5 100644 --- a/crates/handlers/src/lib.rs +++ b/crates/handlers/src/lib.rs @@ -259,7 +259,6 @@ where ) } -#[expect(clippy::trait_duplication_in_bounds)] pub fn compat_router(templates: Templates) -> Router where S: Clone + Send + Sync + 'static, diff --git a/crates/handlers/src/upstream_oauth2/cache.rs b/crates/handlers/src/upstream_oauth2/cache.rs index d47e715cb..2e0810933 100644 --- a/crates/handlers/src/upstream_oauth2/cache.rs +++ b/crates/handlers/src/upstream_oauth2/cache.rs @@ -147,7 +147,6 @@ impl<'a> LazyProviderInfos<'a> { /// It never evicts entries, does not cache failures and has no locking. /// It can also be refreshed in the background, and warmed up on startup. /// It is good enough for our use case. -#[expect(clippy::module_name_repetitions)] #[derive(Debug, Clone, Default)] pub struct MetadataCache { cache: Arc>>>, diff --git a/crates/handlers/src/upstream_oauth2/mod.rs b/crates/handlers/src/upstream_oauth2/mod.rs index 0cccbb048..dab366094 100644 --- a/crates/handlers/src/upstream_oauth2/mod.rs +++ b/crates/handlers/src/upstream_oauth2/mod.rs @@ -26,7 +26,6 @@ mod template; use self::cookie::UpstreamSessions as UpstreamSessionsCookie; #[derive(Debug, Error)] -#[expect(clippy::enum_variant_names)] enum ProviderCredentialsError { #[error("Provider doesn't have a client secret")] MissingClientSecret, diff --git a/crates/iana/src/jose.rs b/crates/iana/src/jose.rs index 7de6d286c..d3b81ce53 100644 --- a/crates/iana/src/jose.rs +++ b/crates/iana/src/jose.rs @@ -148,7 +148,6 @@ impl schemars::JsonSchema for JsonWebSignatureAlg { std::borrow::Cow::Borrowed("JsonWebSignatureAlg") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -393,7 +392,6 @@ impl schemars::JsonSchema for JsonWebEncryptionAlg { std::borrow::Cow::Borrowed("JsonWebEncryptionAlg") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -583,7 +581,6 @@ impl schemars::JsonSchema for JsonWebEncryptionEnc { std::borrow::Cow::Borrowed("JsonWebEncryptionEnc") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -683,7 +680,6 @@ impl schemars::JsonSchema for JsonWebEncryptionCompressionAlgorithm { std::borrow::Cow::Borrowed("JsonWebEncryptionCompressionAlgorithm") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -773,7 +769,6 @@ impl schemars::JsonSchema for JsonWebKeyType { std::borrow::Cow::Borrowed("JsonWebKeyType") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -878,7 +873,6 @@ impl schemars::JsonSchema for JsonWebKeyEcEllipticCurve { std::borrow::Cow::Borrowed("JsonWebKeyEcEllipticCurve") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -983,7 +977,6 @@ impl schemars::JsonSchema for JsonWebKeyOkpEllipticCurve { std::borrow::Cow::Borrowed("JsonWebKeyOkpEllipticCurve") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -1078,7 +1071,6 @@ impl schemars::JsonSchema for JsonWebKeyUse { std::borrow::Cow::Borrowed("JsonWebKeyUse") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -1193,7 +1185,6 @@ impl schemars::JsonSchema for JsonWebKeyOperation { std::borrow::Cow::Borrowed("JsonWebKeyOperation") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- diff --git a/crates/iana/src/oauth.rs b/crates/iana/src/oauth.rs index a2f09f7fb..8ee1c2b42 100644 --- a/crates/iana/src/oauth.rs +++ b/crates/iana/src/oauth.rs @@ -83,7 +83,6 @@ impl schemars::JsonSchema for OAuthAccessTokenType { std::borrow::Cow::Borrowed("OAuthAccessTokenType") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -199,7 +198,6 @@ impl schemars::JsonSchema for OAuthAuthorizationEndpointResponseType { std::borrow::Cow::Borrowed("OAuthAuthorizationEndpointResponseType") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -311,7 +309,6 @@ impl schemars::JsonSchema for OAuthTokenTypeHint { std::borrow::Cow::Borrowed("OAuthTokenTypeHint") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -423,7 +420,6 @@ impl schemars::JsonSchema for OAuthClientAuthenticationMethod { std::borrow::Cow::Borrowed("OAuthClientAuthenticationMethod") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- @@ -526,7 +522,6 @@ impl schemars::JsonSchema for PkceCodeChallengeMethod { std::borrow::Cow::Borrowed("PkceCodeChallengeMethod") } - #[expect(clippy::too_many_lines)] fn json_schema(_gen: &mut schemars::SchemaGenerator) -> schemars::Schema { let enums = vec![ // --- diff --git a/crates/jose/src/constraints.rs b/crates/jose/src/constraints.rs index 315033164..bd0147cdb 100644 --- a/crates/jose/src/constraints.rs +++ b/crates/jose/src/constraints.rs @@ -173,7 +173,6 @@ impl<'a> FromIterator> for ConstraintSet<'a> { } } -#[expect(dead_code)] impl<'a> ConstraintSet<'a> { pub fn new(constraints: impl IntoIterator>) -> Self { constraints.into_iter().collect() diff --git a/crates/jose/src/jwk/private_parameters.rs b/crates/jose/src/jwk/private_parameters.rs index 61c5f2df6..5e0bc01ae 100644 --- a/crates/jose/src/jwk/private_parameters.rs +++ b/crates/jose/src/jwk/private_parameters.rs @@ -214,7 +214,6 @@ mod rsa_impls { impl TryFrom<&RsaPrivateParameters> for RsaPrivateKey { type Error = rsa::errors::Error; - #[expect(clippy::many_single_char_names)] fn try_from(value: &RsaPrivateParameters) -> Result { let n = BigUint::from_bytes_be(value.n.as_bytes()); let e = BigUint::from_bytes_be(value.e.as_bytes()); diff --git a/crates/jose/src/jwt/signed.rs b/crates/jose/src/jwt/signed.rs index c7b5762ac..5a495f256 100644 --- a/crates/jose/src/jwt/signed.rs +++ b/crates/jose/src/jwt/signed.rs @@ -167,7 +167,6 @@ pub enum JwtVerificationError { } impl JwtVerificationError { - #[expect(clippy::needless_pass_by_value)] fn parse_signature(_inner: E) -> Self { Self::ParseSignature } diff --git a/crates/storage-pg/src/oauth2/authorization_grant.rs b/crates/storage-pg/src/oauth2/authorization_grant.rs index 4df344e8e..24f161b7f 100644 --- a/crates/storage-pg/src/oauth2/authorization_grant.rs +++ b/crates/storage-pg/src/oauth2/authorization_grant.rs @@ -35,7 +35,6 @@ impl<'c> PgOAuth2AuthorizationGrantRepository<'c> { } } -#[expect(clippy::struct_excessive_bools)] struct GrantLookup { oauth2_authorization_grant_id: Uuid, created_at: DateTime, diff --git a/crates/tower/src/metrics/make_attributes.rs b/crates/tower/src/metrics/make_attributes.rs index c357c2c75..7137989a3 100644 --- a/crates/tower/src/metrics/make_attributes.rs +++ b/crates/tower/src/metrics/make_attributes.rs @@ -136,8 +136,12 @@ macro_rules! impl_for_tuple { $($rest: MetricsAttributes + 'static,)* { type Iter<'a> = chain_for!($first $(, $rest)*); + // Lint-ignore for the `#[allow(...)]` usage below + #[expect(clippy::allow_attributes)] fn attributes<'a>(&'a self, t: &'a T) -> Self::Iter<'a> { - #[expect(non_snake_case)] + // This has to be a an `#[allow(...)]` as it doesn't get fulfilled here but is + // relevant when the macro expansion occurs. + #[allow(non_snake_case)] let (head, $($rest,)*) = self; head.attributes(t) $(.chain($rest.attributes(t)))*