mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-12-25 01:49:31 +01:00
cargo fmt
This commit is contained in:
parent
f622f12bba
commit
c6f8bcb504
1 changed files with 8 additions and 6 deletions
|
@ -1,16 +1,18 @@
|
|||
use crate::{
|
||||
headers::{HX_REQUEST_STR, HX_TARGET_STR},
|
||||
HxError,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
|
||||
use axum::{extract::Request, middleware::Next, response::Response};
|
||||
use axum_core::response::IntoResponse;
|
||||
use http::{
|
||||
header::{HeaderValue, VARY},
|
||||
Extensions,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::oneshot::{self, Receiver, Sender};
|
||||
|
||||
use crate::{
|
||||
headers::{HX_REQUEST_STR, HX_TARGET_STR},
|
||||
HxError,
|
||||
};
|
||||
|
||||
const MIDDLEWARE_DOUBLE_USE: &str =
|
||||
"Configuration error: `axum_httpx::vary_middleware` is used twice";
|
||||
|
||||
|
@ -91,10 +93,10 @@ pub async fn vary_middleware(mut request: Request, next: Next) -> Response {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::{HxRequest, HxTarget};
|
||||
use axum::{routing::get, Router};
|
||||
|
||||
use super::*;
|
||||
use crate::{HxRequest, HxTarget};
|
||||
|
||||
fn vary_headers(resp: &axum_test::TestResponse) -> Vec<HeaderValue> {
|
||||
resp.iter_headers_by_name("vary").cloned().collect()
|
||||
|
|
Loading…
Reference in a new issue