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:
+4
-4
@@ -4,7 +4,7 @@
|
||||
//! cargo run --example form
|
||||
//! ```
|
||||
|
||||
use axum::prelude::*;
|
||||
use axum::{extract::Form, handler::get, response::Html, route, routing::RoutingDsl};
|
||||
use serde::Deserialize;
|
||||
use std::net::SocketAddr;
|
||||
|
||||
@@ -28,8 +28,8 @@ async fn main() {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
async fn show_form() -> response::Html<&'static str> {
|
||||
response::Html(
|
||||
async fn show_form() -> Html<&'static str> {
|
||||
Html(
|
||||
r#"
|
||||
<!doctype html>
|
||||
<html>
|
||||
@@ -60,6 +60,6 @@ struct Input {
|
||||
email: String,
|
||||
}
|
||||
|
||||
async fn accept_form(extract::Form(input): extract::Form<Input>) {
|
||||
async fn accept_form(Form(input): Form<Input>) {
|
||||
dbg!(&input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user