mirror of
https://github.com/actix/actix-web.git
synced 2025-04-04 09:09:35 +00:00
Convert rest of the examples to rust-2018 edition.
This commit is contained in:
parent
733ad40c66
commit
302e4cf3d5
3 changed files with 5 additions and 5 deletions
|
@ -46,9 +46,9 @@ pub trait FromRequest: Sized {
|
|||
/// ## Example
|
||||
///
|
||||
/// ```rust
|
||||
/// # #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, dev, App, Error, HttpRequest, FromRequest};
|
||||
/// use actix_web::error::ErrorBadRequest;
|
||||
/// use serde_derive::Deserialize;
|
||||
/// use rand;
|
||||
///
|
||||
/// #[derive(Debug, Deserialize)]
|
||||
|
@ -119,9 +119,9 @@ where
|
|||
/// ## Example
|
||||
///
|
||||
/// ```rust
|
||||
/// # #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, dev, App, Result, Error, HttpRequest, FromRequest};
|
||||
/// use actix_web::error::ErrorBadRequest;
|
||||
/// use serde_derive::Deserialize;
|
||||
/// use rand;
|
||||
///
|
||||
/// #[derive(Debug, Deserialize)]
|
||||
|
|
|
@ -271,8 +271,8 @@ impl Drop for HttpRequest {
|
|||
/// ## Example
|
||||
///
|
||||
/// ```rust
|
||||
/// # #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, App, HttpRequest};
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// /// extract `Thing` from request
|
||||
/// fn index(req: HttpRequest) -> String {
|
||||
|
|
|
@ -178,8 +178,8 @@ impl Route {
|
|||
/// Set handler function, use request extractors for parameters.
|
||||
///
|
||||
/// ```rust
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, http, App};
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Deserialize)]
|
||||
/// struct Info {
|
||||
|
@ -239,9 +239,9 @@ impl Route {
|
|||
///
|
||||
/// ```rust
|
||||
/// # use futures::future::ok;
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, App, Error};
|
||||
/// use futures::Future;
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Deserialize)]
|
||||
/// struct Info {
|
||||
|
|
Loading…
Reference in a new issue