diff --git a/crates/cli/src/server.rs b/crates/cli/src/server.rs index 2fe548fa..195aadbc 100644 --- a/crates/cli/src/server.rs +++ b/crates/cli/src/server.rs @@ -35,7 +35,6 @@ use sentry_tower::{NewSentryLayer, SentryHttpLayer}; use tower::Layer; use tower_http::{compression::CompressionLayer, services::ServeDir}; -#[allow(clippy::trait_duplication_in_bounds)] pub fn build_router( state: AppState, resources: &[HttpResource], diff --git a/crates/data-model/src/lib.rs b/crates/data-model/src/lib.rs index bde11fbe..0bdae320 100644 --- a/crates/data-model/src/lib.rs +++ b/crates/data-model/src/lib.rs @@ -18,9 +18,7 @@ #![allow( clippy::module_name_repetitions, clippy::missing_panics_doc, - clippy::missing_errors_doc, - clippy::trait_duplication_in_bounds, - clippy::type_repetition_in_bounds + clippy::missing_errors_doc )] use thiserror::Error; diff --git a/crates/graphql/src/model/upstream_oauth.rs b/crates/graphql/src/model/upstream_oauth.rs index 76b3a44a..c2daaf9f 100644 --- a/crates/graphql/src/model/upstream_oauth.rs +++ b/crates/graphql/src/model/upstream_oauth.rs @@ -103,6 +103,9 @@ impl UpstreamOAuth2Link { } else { // Fetch on-the-fly let mut repo = ctx.data::>()?.lock().await; + + // This is a false positive, since it would have a lifetime error + #[allow(clippy::let_and_return)] let provider = repo .upstream_oauth_provider() .lookup(self.link.provider_id) @@ -122,6 +125,9 @@ impl UpstreamOAuth2Link { } else if let Some(user_id) = &self.link.user_id { // Fetch on-the-fly let mut repo = ctx.data::>()?.lock().await; + + // This is a false positive, since it would have a lifetime error + #[allow(clippy::let_and_return)] let user = repo .user() .lookup(*user_id) diff --git a/crates/handlers/src/lib.rs b/crates/handlers/src/lib.rs index de5e0d87..f1ea5d51 100644 --- a/crates/handlers/src/lib.rs +++ b/crates/handlers/src/lib.rs @@ -82,7 +82,6 @@ pub use mas_axum_utils::http_client_factory::HttpClientFactory; pub use self::{app_state::AppState, compat::MatrixHomeserver, graphql::schema as graphql_schema}; -#[must_use] pub fn healthcheck_router() -> Router where B: HttpBody + Send + 'static, @@ -92,7 +91,6 @@ where Router::new().route(mas_router::Healthcheck::route(), get(self::health::get)) } -#[must_use] pub fn graphql_router(playground: bool) -> Router where B: HttpBody + Send + 'static, @@ -115,7 +113,6 @@ where router } -#[must_use] pub fn discovery_router() -> Router where B: HttpBody + Send + 'static, @@ -149,8 +146,6 @@ where ) } -#[must_use] -#[allow(clippy::trait_duplication_in_bounds)] pub fn api_router() -> Router where B: HttpBody + Send + 'static, @@ -210,7 +205,6 @@ where ) } -#[must_use] #[allow(clippy::trait_duplication_in_bounds)] pub fn compat_router() -> Router where @@ -254,8 +248,6 @@ where ) } -#[must_use] -#[allow(clippy::trait_duplication_in_bounds)] pub fn human_router(templates: Templates) -> Router where B: HttpBody + Send + 'static, diff --git a/crates/handlers/src/views/register.rs b/crates/handlers/src/views/register.rs index 53cc959a..c9f33754 100644 --- a/crates/handlers/src/views/register.rs +++ b/crates/handlers/src/views/register.rs @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(clippy::trait_duplication_in_bounds)] - use std::{str::FromStr, sync::Arc}; use axum::{ diff --git a/crates/templates/src/context.rs b/crates/templates/src/context.rs index feed6765..f5edef39 100644 --- a/crates/templates/src/context.rs +++ b/crates/templates/src/context.rs @@ -14,8 +14,6 @@ //! Contexts used in templates -#![allow(clippy::trait_duplication_in_bounds, clippy::type_repetition_in_bounds)] - use chrono::Utc; use mas_data_model::{ AuthorizationGrant, BrowserSession, Client, CompatSsoLogin, CompatSsoLoginState,