From 59898d0177712e2668999424193955e7b4e37228 Mon Sep 17 00:00:00 2001 From: Shannon Sterz Date: Thu, 6 Mar 2025 13:43:43 +0100 Subject: [PATCH] rest-server/router: ignore type complexity clippy lint the `type_complexity` clippy lint [1] is intended to make the code more legible in most cases. however, the lint triggers on a member of a private enum, an example minimal rest server and a private static variable here. so the benefits of declaring a new type that would encapsulate this complexity is minimal. hence, ignore the warnings for now. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity Signed-off-by: Shannon Sterz --- proxmox-acme-api/src/challenge_schemas.rs | 1 + proxmox-rest-server/examples/minimal-rest-server.rs | 1 + proxmox-router/src/stream/parsing.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/proxmox-acme-api/src/challenge_schemas.rs b/proxmox-acme-api/src/challenge_schemas.rs index 40a6a6af..e66e327e 100644 --- a/proxmox-acme-api/src/challenge_schemas.rs +++ b/proxmox-acme-api/src/challenge_schemas.rs @@ -49,6 +49,7 @@ fn load_dns_challenge_schema() -> Result, Error> { } pub fn get_cached_challenge_schemas() -> Result { + #[allow(clippy::type_complexity)] static CACHE: LazyLock>, SystemTime)>>> = LazyLock::new(|| Mutex::new(None)); diff --git a/proxmox-rest-server/examples/minimal-rest-server.rs b/proxmox-rest-server/examples/minimal-rest-server.rs index d6a5f2eb..23be586c 100644 --- a/proxmox-rest-server/examples/minimal-rest-server.rs +++ b/proxmox-rest-server/examples/minimal-rest-server.rs @@ -31,6 +31,7 @@ impl UserInformation for DummyUserInfo { } } +#[allow(clippy::type_complexity)] fn check_auth<'a>( _headers: &'a HeaderMap, _method: &'a Method, diff --git a/proxmox-router/src/stream/parsing.rs b/proxmox-router/src/stream/parsing.rs index 69ae1994..1726d2f8 100644 --- a/proxmox-router/src/stream/parsing.rs +++ b/proxmox-router/src/stream/parsing.rs @@ -60,6 +60,7 @@ where enum RecordsInner { New(R), + #[allow(clippy::type_complexity)] Reading(Pin, R)>>> + Send + Sync>>), Done, }