mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 00:50:20 +02:00
Convert documentation examples to Rust 2018 edition (#1120)
* Convert types::query examples to rust-2018 edition * Convert types::json examples to rust-2018 edition * Convert types::path examples to rust-2018 edition * Convert types::form examples to rust-2018 edition * Convert rest of the examples to rust-2018 edition.
This commit is contained in:
@@ -21,8 +21,8 @@ use crate::request::HttpRequest;
|
||||
/// ## Example
|
||||
///
|
||||
/// ```rust
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, App};
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Debug, Deserialize)]
|
||||
/// pub enum ResponseType {
|
||||
@@ -99,8 +99,8 @@ impl<T: fmt::Display> fmt::Display for Query<T> {
|
||||
/// ## Example
|
||||
///
|
||||
/// ```rust
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{web, App};
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Debug, Deserialize)]
|
||||
/// pub enum ResponseType {
|
||||
@@ -169,8 +169,8 @@ where
|
||||
/// ## Example
|
||||
///
|
||||
/// ```rust
|
||||
/// #[macro_use] extern crate serde_derive;
|
||||
/// use actix_web::{error, web, App, FromRequest, HttpResponse};
|
||||
/// use serde_derive::Deserialize;
|
||||
///
|
||||
/// #[derive(Deserialize)]
|
||||
/// struct Info {
|
||||
|
Reference in New Issue
Block a user