From 0a2eabed3663eab154b17a964260b6db5c4fa2b4 Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Mon, 27 May 2024 02:53:17 +0800 Subject: [PATCH] clippy --- viz-core/src/middleware/csrf.rs | 1 + viz-core/src/types/params.rs | 1 + viz-core/src/types/params/de.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/viz-core/src/middleware/csrf.rs b/viz-core/src/middleware/csrf.rs index 8d5cb310..8a7aff2f 100644 --- a/viz-core/src/middleware/csrf.rs +++ b/viz-core/src/middleware/csrf.rs @@ -262,6 +262,7 @@ pub fn verify(secret: &[u8], raw_token: String) -> bool { } /// Retures masked token +#[allow(clippy::needless_collect)] fn mask(secret: &[u8], mut otp: Vec) -> Vec { otp.extend::>( secret diff --git a/viz-core/src/types/params.rs b/viz-core/src/types/params.rs index 615e34f2..0357c63f 100644 --- a/viz-core/src/types/params.rs +++ b/viz-core/src/types/params.rs @@ -14,6 +14,7 @@ use crate::{ Error, FromRequest, IntoResponse, Request, RequestExt, Response, StatusCode, ThisError, }; +#[allow(clippy::redundant_pub_crate)] pub(crate) use de::PathDeserializer; /// Extracts params from the path of a URL. diff --git a/viz-core/src/types/params/de.rs b/viz-core/src/types/params/de.rs index c857e3db..a8a2d257 100644 --- a/viz-core/src/types/params/de.rs +++ b/viz-core/src/types/params/de.rs @@ -40,6 +40,7 @@ macro_rules! parse_single_value { }; } +#[allow(clippy::redundant_pub_crate)] pub(crate) struct PathDeserializer<'de> { path: &'de [(String, String)], }