Remove unused lint ignores

This commit is contained in:
Eric Eastwood
2026-05-21 16:44:20 -05:00
parent fa23689962
commit ee88379fc4
13 changed files with 5 additions and 26 deletions
-1
View File
@@ -191,7 +191,6 @@ fn stdout_metric_reader() -> PeriodicReader<opentelemetry_stdout::MetricExporter
type PromServiceFuture =
std::future::Ready<Result<Response<Full<Bytes>>, std::convert::Infallible>>;
#[expect(clippy::needless_pass_by_value)]
fn prometheus_service_fn<T>(_req: T) -> PromServiceFuture {
let response = if let Some(exporter) = PROMETHEUS_EXPORTER.get() {
// We'll need some space for this, so we preallocate a bit
@@ -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
}
-1
View File
@@ -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);
-1
View File
@@ -259,7 +259,6 @@ where
)
}
#[expect(clippy::trait_duplication_in_bounds)]
pub fn compat_router<S>(templates: Templates) -> Router<S>
where
S: Clone + Send + Sync + 'static,
@@ -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<RwLock<HashMap<String, Arc<VerifiedProviderMetadata>>>>,
@@ -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,
-9
View File
@@ -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![
// ---
-5
View File
@@ -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![
// ---
-1
View File
@@ -173,7 +173,6 @@ impl<'a> FromIterator<Constraint<'a>> for ConstraintSet<'a> {
}
}
#[expect(dead_code)]
impl<'a> ConstraintSet<'a> {
pub fn new(constraints: impl IntoIterator<Item = Constraint<'a>>) -> Self {
constraints.into_iter().collect()
@@ -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<Self, Self::Error> {
let n = BigUint::from_bytes_be(value.n.as_bytes());
let e = BigUint::from_bytes_be(value.e.as_bytes());
-1
View File
@@ -167,7 +167,6 @@ pub enum JwtVerificationError {
}
impl JwtVerificationError {
#[expect(clippy::needless_pass_by_value)]
fn parse_signature<E>(_inner: E) -> Self {
Self::ParseSignature
}
@@ -35,7 +35,6 @@ impl<'c> PgOAuth2AuthorizationGrantRepository<'c> {
}
}
#[expect(clippy::struct_excessive_bools)]
struct GrantLookup {
oauth2_authorization_grant_id: Uuid,
created_at: DateTime<Utc>,
+5 -1
View File
@@ -136,8 +136,12 @@ macro_rules! impl_for_tuple {
$($rest: MetricsAttributes<T> + '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)))*