mirror of
https://github.com/actix/actix-web.git
synced 2025-04-14 05:44:05 +00:00
Convert types::form examples to rust-2018 edition
This commit is contained in:
parent
cf9db84d31
commit
733ad40c66
1 changed files with 6 additions and 7 deletions
|
@ -35,9 +35,8 @@ use crate::responder::Responder;
|
|||
///
|
||||
/// ### Example
|
||||
/// ```rust
|
||||
/// # extern crate actix_web;
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, App};
|
||||
/// use actix_web::web;
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Deserialize)]
|
||||
/// struct FormData {
|
||||
|
@ -61,9 +60,9 @@ use crate::responder::Responder;
|
|||
///
|
||||
/// ### Example
|
||||
/// ```rust
|
||||
/// # #[macro_use] extern crate serde_derive;
|
||||
/// # use actix_web::*;
|
||||
/// #
|
||||
/// use actix_web::*;
|
||||
/// use serde_derive::Serialize;
|
||||
///
|
||||
/// #[derive(Serialize)]
|
||||
/// struct SomeForm {
|
||||
/// name: String,
|
||||
|
@ -167,8 +166,8 @@ impl<T: Serialize> Responder for Form<T> {
|
|||
/// Form extractor configuration
|
||||
///
|
||||
/// ```rust
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, App, FromRequest, Result};
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Deserialize)]
|
||||
/// struct FormData {
|
||||
|
|
Loading…
Reference in a new issue