From ab6f6c69e751e5c9c1717db010364f1024dd8ae0 Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Wed, 22 Nov 2023 10:54:46 +0800 Subject: [PATCH] lint: allow too_many_lines --- Cargo.toml | 1 + viz-core/tests/handler.rs | 1 - viz-core/tests/request.rs | 1 - viz-router/src/resources.rs | 1 - viz-router/src/route.rs | 1 - viz-router/src/router.rs | 1 - 6 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 569426c8..f6d9b5e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,3 +124,4 @@ missing_docs = "warn" all = "deny" pedantic = "deny" module_name_repetitions = { level = "allow", priority = 1 } +too_many_lines = { level = "allow", priority = 1 } diff --git a/viz-core/tests/handler.rs b/viz-core/tests/handler.rs index b404dbfd..ca582ca5 100644 --- a/viz-core/tests/handler.rs +++ b/viz-core/tests/handler.rs @@ -1,7 +1,6 @@ #![allow(dead_code)] #![allow(clippy::unused_async)] #![allow(clippy::similar_names)] -#![allow(clippy::too_many_lines)] #![allow(clippy::wildcard_imports)] use http_body_util::Full; diff --git a/viz-core/tests/request.rs b/viz-core/tests/request.rs index eb46bc95..afaca620 100644 --- a/viz-core/tests/request.rs +++ b/viz-core/tests/request.rs @@ -71,7 +71,6 @@ fn request_ext() -> Result<()> { Ok(()) } -#[allow(clippy::too_many_lines)] #[tokio::test] async fn request_body() -> Result<()> { use futures_util::stream::TryStreamExt; diff --git a/viz-router/src/resources.rs b/viz-router/src/resources.rs index 21106f70..bd3ca803 100644 --- a/viz-router/src/resources.rs +++ b/viz-router/src/resources.rs @@ -254,7 +254,6 @@ impl IntoIterator for Resources { #[cfg(test)] #[allow(clippy::unused_async)] -#[allow(clippy::too_many_lines)] mod tests { use super::Kind; use crate::{get, Resources}; diff --git a/viz-router/src/route.rs b/viz-router/src/route.rs index 8d8d6d23..d9142ca2 100644 --- a/viz-router/src/route.rs +++ b/viz-router/src/route.rs @@ -212,7 +212,6 @@ impl fmt::Debug for Route { #[cfg(test)] #[allow(dead_code)] #[allow(clippy::unused_async)] -#[allow(clippy::too_many_lines)] mod tests { use super::Route; use http_body_util::BodyExt; diff --git a/viz-router/src/router.rs b/viz-router/src/router.rs index 2312032f..b98c1c05 100644 --- a/viz-router/src/router.rs +++ b/viz-router/src/router.rs @@ -182,7 +182,6 @@ impl Router { #[cfg(test)] #[allow(clippy::unused_async)] -#[allow(clippy::too_many_lines)] mod tests { use http_body_util::{BodyExt, Full}; use std::sync::Arc;