♻️ 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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose --all-features --workspace
|
run: cargo test --verbose --all-features --workspace
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1038,7 +1038,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lib"
|
name = "lib"
|
||||||
version = "1.5.0"
|
version = "2.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -10,7 +10,7 @@ homepage = "emberal.github.io"
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "lib"
|
name = "lib"
|
||||||
version = "1.5.0"
|
version = "2.0.0"
|
||||||
description = "A library with utilities and helper fuctions."
|
description = "A library with utilities and helper fuctions."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
rust-version = { 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 {
|
use axum::Router;
|
||||||
axum::{
|
use axum::ServiceExt;
|
||||||
Router, ServiceExt, extract::Request, handler::Handler, response::IntoResponse,
|
use axum::extract::Request;
|
||||||
routing::Route,
|
use axum::handler::Handler;
|
||||||
},
|
use axum::response::IntoResponse;
|
||||||
std::{
|
use axum::routing::Route;
|
||||||
convert::Infallible,
|
use std::convert::Infallible;
|
||||||
io,
|
use std::io;
|
||||||
net::{IpAddr, Ipv4Addr, SocketAddr},
|
use std::net::IpAddr;
|
||||||
},
|
use std::net::Ipv4Addr;
|
||||||
tokio::net::TcpListener,
|
use std::net::SocketAddr;
|
||||||
tower::{Service, layer::Layer},
|
use tokio::net::TcpListener;
|
||||||
tower_http::{
|
use tower::{Service, layer::Layer};
|
||||||
cors::CorsLayer,
|
use tower_http::cors::CorsLayer;
|
||||||
normalize_path::NormalizePathLayer,
|
use tower_http::normalize_path::NormalizePathLayer;
|
||||||
trace,
|
use tower_http::trace;
|
||||||
trace::{HttpMakeClassifier, TraceLayer},
|
use tower_http::trace::HttpMakeClassifier;
|
||||||
},
|
use tower_http::trace::TraceLayer;
|
||||||
tracing::{Level, info},
|
use tracing::{Level, info};
|
||||||
};
|
|
||||||
|
|
||||||
// TODO trim trailing slash into macro > let _app = NormalizePathLayer::trim_trailing_slash().layer(create_app!(routes));
|
// TODO trim trailing slash into macro > let _app = NormalizePathLayer::trim_trailing_slash().layer(create_app!(routes));
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
@ -201,7 +200,7 @@ mod tests {
|
|||||||
AppBuilder::new()
|
AppBuilder::new()
|
||||||
.socket((Ipv4Addr::LOCALHOST, 8080))
|
.socket((Ipv4Addr::LOCALHOST, 8080))
|
||||||
.routes([Router::new()])
|
.routes([Router::new()])
|
||||||
.fallback(|| async { "Fallback" })
|
.fallback(async || "Fallback")
|
||||||
.cors(CorsLayer::new())
|
.cors(CorsLayer::new())
|
||||||
.normalize_path(true)
|
.normalize_path(true)
|
||||||
.tracing(TraceLayer::new_for_http())
|
.tracing(TraceLayer::new_for_http())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user