1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

reexpost extractors in web module

This commit is contained in:
Nikolay Kim
2019-03-07 11:43:46 -08:00
parent 22708e78a9
commit ceb6d45bf2
6 changed files with 41 additions and 42 deletions

View File

@@ -554,8 +554,8 @@ impl Default for FormConfig {
/// name: String,
/// }
///
/// fn index(req: HttpRequest) -> Result<Json<MyObj>> {
/// Ok(Json(MyObj {
/// fn index(req: HttpRequest) -> Result<web::Json<MyObj>> {
/// Ok(web::Json(MyObj {
/// name: req.match_info().get("name").unwrap().to_string(),
/// }))
/// }
@@ -679,7 +679,7 @@ where
///
/// ```rust
/// #[macro_use] extern crate serde_derive;
/// use actix_web::{error, extract, web, App, HttpResponse, Json};
/// use actix_web::{error, extract, web, App, HttpResponse};
///
/// #[derive(Deserialize)]
/// struct Info {
@@ -687,7 +687,7 @@ where
/// }
///
/// /// deserialize `Info` from request's body, max payload size is 4kb
/// fn index(info: Json<Info>) -> String {
/// fn index(info: web::Json<Info>) -> String {
/// format!("Welcome {}!", info.username)
/// }
///