♻️ Renamed .github to .gitea, Short description in README,
Some checks failed
Build & test / build (push) Failing after 12m1s

refactor uses
This commit is contained in:
2025-03-08 17:58:07 +01:00
parent 7a46101b42
commit 35ccc235c8
5 changed files with 27 additions and 25 deletions

View File

@ -1,23 +1,22 @@
use {
axum::{
Router, ServiceExt, extract::Request, handler::Handler, response::IntoResponse,
routing::Route,
},
std::{
convert::Infallible,
io,
net::{IpAddr, Ipv4Addr, SocketAddr},
},
tokio::net::TcpListener,
tower::{Service, layer::Layer},
tower_http::{
cors::CorsLayer,
normalize_path::NormalizePathLayer,
trace,
trace::{HttpMakeClassifier, TraceLayer},
},
tracing::{Level, info},
};
use axum::Router;
use axum::ServiceExt;
use axum::extract::Request;
use axum::handler::Handler;
use axum::response::IntoResponse;
use axum::routing::Route;
use std::convert::Infallible;
use std::io;
use std::net::IpAddr;
use std::net::Ipv4Addr;
use std::net::SocketAddr;
use tokio::net::TcpListener;
use tower::{Service, layer::Layer};
use tower_http::cors::CorsLayer;
use tower_http::normalize_path::NormalizePathLayer;
use tower_http::trace;
use tower_http::trace::HttpMakeClassifier;
use tower_http::trace::TraceLayer;
use tracing::{Level, info};
// TODO trim trailing slash into macro > let _app = NormalizePathLayer::trim_trailing_slash().layer(create_app!(routes));
#[macro_export]
@ -201,7 +200,7 @@ mod tests {
AppBuilder::new()
.socket((Ipv4Addr::LOCALHOST, 8080))
.routes([Router::new()])
.fallback(|| async { "Fallback" })
.fallback(async || "Fallback")
.cors(CorsLayer::new())
.normalize_path(true)
.tracing(TraceLayer::new_for_http())