mirror of https://github.com/fafhrd91/actix-web
Convert types::path examples to rust-2018 edition
This commit is contained in:
parent
df9ea4af3f
commit
cf9db84d31
|
@ -39,8 +39,8 @@ use crate::FromRequest;
|
||||||
/// implements `Deserialize` trait from *serde*.
|
/// implements `Deserialize` trait from *serde*.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// #[macro_use] extern crate serde_derive;
|
|
||||||
/// use actix_web::{web, App, Error};
|
/// use actix_web::{web, App, Error};
|
||||||
|
/// use serde_derive::Deserialize;
|
||||||
///
|
///
|
||||||
/// #[derive(Deserialize)]
|
/// #[derive(Deserialize)]
|
||||||
/// struct Info {
|
/// struct Info {
|
||||||
|
@ -134,8 +134,8 @@ impl<T: fmt::Display> fmt::Display for Path<T> {
|
||||||
/// implements `Deserialize` trait from *serde*.
|
/// implements `Deserialize` trait from *serde*.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// #[macro_use] extern crate serde_derive;
|
|
||||||
/// use actix_web::{web, App, Error};
|
/// use actix_web::{web, App, Error};
|
||||||
|
/// use serde_derive::Deserialize;
|
||||||
///
|
///
|
||||||
/// #[derive(Deserialize)]
|
/// #[derive(Deserialize)]
|
||||||
/// struct Info {
|
/// struct Info {
|
||||||
|
@ -190,10 +190,9 @@ where
|
||||||
/// Path extractor configuration
|
/// Path extractor configuration
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # #[macro_use]
|
|
||||||
/// # extern crate serde_derive;
|
|
||||||
/// use actix_web::web::PathConfig;
|
/// use actix_web::web::PathConfig;
|
||||||
/// use actix_web::{error, web, App, FromRequest, HttpResponse};
|
/// use actix_web::{error, web, App, FromRequest, HttpResponse};
|
||||||
|
/// use serde_derive::Deserialize;
|
||||||
///
|
///
|
||||||
/// #[derive(Deserialize, Debug)]
|
/// #[derive(Deserialize, Debug)]
|
||||||
/// enum Folder {
|
/// enum Folder {
|
||||||
|
|
Loading…
Reference in New Issue