From 5bcbc9cb10d28f99af64ee1634beb735f588c4e1 Mon Sep 17 00:00:00 2001 From: Rob Wagner Date: Fri, 18 Oct 2024 20:39:09 -0400 Subject: [PATCH] Fix clippy complaints --- src/auto_vary.rs | 9 ++++++--- src/guard.rs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/auto_vary.rs b/src/auto_vary.rs index 28af482..e51eb20 100644 --- a/src/auto_vary.rs +++ b/src/auto_vary.rs @@ -28,9 +28,12 @@ use crate::{HxRequest, HxTarget, HxTrigger, HxTriggerName}; const MIDDLEWARE_DOUBLE_USE: &str = "Configuration error: `axum_httpx::vary_middleware` is used twice"; -/// Addresses [htmx caching issue](https://htmx.org/docs/#caching) -/// by automatically adding a corresponding `Vary` header when [`HxRequest`], -/// [`HxTarget`], [`HxTrigger`], [`HxTriggerName`] or their combination is used. +/// Automatically adds a `Vary` header when needed. +/// +/// Addresses [htmx caching issues](https://htmx.org/docs/#caching) +/// by automatically adding a corresponding `Vary` header when +/// [`HxRequest`], [`HxTarget`], [`HxTrigger`], [`HxTriggerName`] +/// or their combination is used. #[derive(Clone)] pub struct AutoVaryLayer; diff --git a/src/guard.rs b/src/guard.rs index 86ca938..9584771 100644 --- a/src/guard.rs +++ b/src/guard.rs @@ -96,7 +96,7 @@ mod private { } } - impl<'a, F, B, E> Future for ResponseFuture<'a, F> + impl Future for ResponseFuture<'_, F> where F: Future, E>>, B: Default,