mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Remove axum::prelude (#195)
This commit is contained in:
+6
-3
@@ -6,7 +6,10 @@
|
||||
|
||||
use axum::{
|
||||
body::{box_body, Body, BoxBody},
|
||||
prelude::*,
|
||||
handler::get,
|
||||
response::Html,
|
||||
route,
|
||||
routing::RoutingDsl,
|
||||
};
|
||||
use http::{Response, StatusCode};
|
||||
use std::net::SocketAddr;
|
||||
@@ -34,8 +37,8 @@ async fn main() {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
async fn handler() -> response::Html<&'static str> {
|
||||
response::Html("<h1>Hello, World!</h1>")
|
||||
async fn handler() -> Html<&'static str> {
|
||||
Html("<h1>Hello, World!</h1>")
|
||||
}
|
||||
|
||||
fn map_404(response: Response<BoxBody>) -> Response<BoxBody> {
|
||||
|
||||
Reference in New Issue
Block a user