1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

rename .to_async() to .to()

This commit is contained in:
Nikolay Kim
2019-11-21 21:34:04 +06:00
parent 0b9e3d381b
commit 8683ba8bb0
25 changed files with 232 additions and 396 deletions

View File

@@ -40,7 +40,7 @@ use crate::request::HttpRequest;
/// fn main() {
/// let app = App::new().service(
/// web::resource("/index.html").route(
/// web::get().to_async(index))
/// web::get().to(index))
/// );
/// }
/// ```
@@ -88,7 +88,7 @@ impl Stream for Payload {
/// fn main() {
/// let app = App::new().service(
/// web::resource("/index.html").route(
/// web::get().to_async(index))
/// web::get().to(index))
/// );
/// }
/// ```
@@ -117,7 +117,7 @@ impl FromRequest for Payload {
/// use actix_web::{web, App};
///
/// /// extract binary data from request
/// fn index(body: Bytes) -> String {
/// async fn index(body: Bytes) -> String {
/// format!("Body {:?}!", body)
/// }
///
@@ -169,7 +169,7 @@ impl FromRequest for Bytes {
/// use actix_web::{web, App, FromRequest};
///
/// /// extract text data from request
/// fn index(text: String) -> String {
/// async fn index(text: String) -> String {
/// format!("Body {}!", text)
/// }
///