diff --git a/src/responders/vary.rs b/src/responders/vary.rs index 03866da..48eee24 100644 --- a/src/responders/vary.rs +++ b/src/responders/vary.rs @@ -1,12 +1,12 @@ use axum_core::response::{IntoResponseParts, ResponseParts}; use http::header::{HeaderValue, VARY}; -use crate::{extractors, headers, HxError}; +use crate::{extractors, HxError}; -const HX_REQUEST: HeaderValue = HeaderValue::from_static(headers::HX_REQUEST); -const HX_TARGET: HeaderValue = HeaderValue::from_static(headers::HX_TARGET); -const HX_TRIGGER: HeaderValue = HeaderValue::from_static(headers::HX_TRIGGER); -const HX_TRIGGER_NAME: HeaderValue = HeaderValue::from_static(headers::HX_TRIGGER_NAME); +const HX_REQUEST: HeaderValue = HeaderValue::from_static("hx-request"); +const HX_TARGET: HeaderValue = HeaderValue::from_static("hx-target"); +const HX_TRIGGER: HeaderValue = HeaderValue::from_static("hx-trigger"); +const HX_TRIGGER_NAME: HeaderValue = HeaderValue::from_static("hx-trigger-name"); /// The `Vary: HX-Request` header. /// @@ -125,10 +125,12 @@ impl extractors::HxTriggerName { #[cfg(test)] mod tests { - use super::*; - use axum::{routing::get, Router}; use std::collections::hash_set::HashSet; + use axum::{routing::get, Router}; + + use super::*; + #[tokio::test] async fn multiple_headers() { let app = Router::new().route("/", get(|| async { (VaryHxRequest, VaryHxTarget, "foo") }));