From a3ec44a5a07265cc3d7fb3b5c71d183e87de8b91 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Fri, 9 Feb 2024 00:55:59 +0100 Subject: [PATCH] Run cargo clippy --fix to fix CI (#2568) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and allow one lint. --- axum/src/extension.rs | 3 +-- axum/src/test_helpers/mod.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/axum/src/extension.rs b/axum/src/extension.rs index a72568ac6c..e4d170fb6d 100644 --- a/axum/src/extension.rs +++ b/axum/src/extension.rs @@ -87,8 +87,7 @@ where "Extension of type `{}` was not found. Perhaps you forgot to add it? See `axum::Extension`.", std::any::type_name::() )) - }) - .map(|x| x.clone())?; + }).cloned()?; Ok(Extension(value)) } diff --git a/axum/src/test_helpers/mod.rs b/axum/src/test_helpers/mod.rs index 3bb1535e40..c6ae1bff4e 100644 --- a/axum/src/test_helpers/mod.rs +++ b/axum/src/test_helpers/mod.rs @@ -10,4 +10,5 @@ pub(crate) mod tracing_helpers; pub(crate) fn assert_send() {} pub(crate) fn assert_sync() {} +#[allow(dead_code)] pub(crate) struct NotSendSync(*const ());