mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-20 00:00:11 +02:00
Replace RoutingDsl trait with Router type (#214)
* Remove `RoutingDsl` * Fix typo
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
//! ```
|
||||
|
||||
use axum::{
|
||||
body::{Body, Bytes},
|
||||
body::Bytes,
|
||||
extract::{ContentLengthLimit, Extension, Path},
|
||||
handler::{delete, get, Handler},
|
||||
http::StatusCode,
|
||||
response::IntoResponse,
|
||||
route,
|
||||
routing::{BoxRoute, RoutingDsl},
|
||||
routing::{BoxRoute, Router},
|
||||
};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
@@ -108,7 +108,7 @@ async fn list_keys(Extension(state): Extension<SharedState>) -> String {
|
||||
.join("\n")
|
||||
}
|
||||
|
||||
fn admin_routes() -> BoxRoute<Body> {
|
||||
fn admin_routes() -> Router<BoxRoute> {
|
||||
async fn delete_all_keys(Extension(state): Extension<SharedState>) {
|
||||
state.write().unwrap().db.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user