♻️ Renamed .github to .gitea, Short description in README,
Some checks failed
Build & test / build (push) Failing after 12m1s
Some checks failed
Build & test / build (push) Failing after 12m1s
refactor uses
This commit is contained in:
parent
7a46101b42
commit
35ccc235c8
@ -12,7 +12,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --verbose --all-features --workspace
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1038,7 +1038,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "lib"
|
||||
version = "1.5.0"
|
||||
version = "2.0.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"chrono",
|
||||
|
@ -10,7 +10,7 @@ homepage = "emberal.github.io"
|
||||
|
||||
[package]
|
||||
name = "lib"
|
||||
version = "1.5.0"
|
||||
version = "2.0.0"
|
||||
description = "A library with utilities and helper fuctions."
|
||||
edition = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
|
@ -1,3 +1,3 @@
|
||||
# Lib
|
||||
# Rust Lib 🦀
|
||||
|
||||
-_-
|
||||
Rust library for common code, traits and utility functions
|
||||
|
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user