mirror of
https://github.com/actix/actix-web.git
synced 2025-04-23 10:14: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
|
/// ### Example
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # extern crate actix_web;
|
/// use actix_web::web;
|
||||||
/// #[macro_use] extern crate serde_derive;
|
/// use serde_derive::Deserialize;
|
||||||
/// use actix_web::{web, App};
|
|
||||||
///
|
///
|
||||||
/// #[derive(Deserialize)]
|
/// #[derive(Deserialize)]
|
||||||
/// struct FormData {
|
/// struct FormData {
|
||||||
|
@ -61,9 +60,9 @@ use crate::responder::Responder;
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # #[macro_use] extern crate serde_derive;
|
/// use actix_web::*;
|
||||||
/// # use actix_web::*;
|
/// use serde_derive::Serialize;
|
||||||
/// #
|
///
|
||||||
/// #[derive(Serialize)]
|
/// #[derive(Serialize)]
|
||||||
/// struct SomeForm {
|
/// struct SomeForm {
|
||||||
/// name: String,
|
/// name: String,
|
||||||
|
@ -167,8 +166,8 @@ impl<T: Serialize> Responder for Form<T> {
|
||||||
/// Form extractor configuration
|
/// Form extractor configuration
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// #[macro_use] extern crate serde_derive;
|
|
||||||
/// use actix_web::{web, App, FromRequest, Result};
|
/// use actix_web::{web, App, FromRequest, Result};
|
||||||
|
/// use serde_derive::Deserialize;
|
||||||
///
|
///
|
||||||
/// #[derive(Deserialize)]
|
/// #[derive(Deserialize)]
|
||||||
/// struct FormData {
|
/// struct FormData {
|
||||||
|
|
Loading…
Reference in a new issue