1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-20 04:35:38 +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

@@ -90,7 +90,7 @@ where
/// counter: Cell<usize>,
/// }
///
/// fn index(data: web::Data<MyData>) {
/// async fn index(data: web::Data<MyData>) {
/// data.counter.set(data.counter.get() + 1);
/// }
///
@@ -192,7 +192,7 @@ where
/// ```rust
/// use actix_web::{web, App, HttpResponse};
///
/// fn index(data: web::Path<(String, String)>) -> &'static str {
/// async fn index(data: web::Path<(String, String)>) -> &'static str {
/// "Welcome!"
/// }
///
@@ -247,7 +247,7 @@ where
/// ```rust
/// use actix_web::{web, App, HttpResponse};
///
/// fn index() -> &'static str {
/// async fn index() -> &'static str {
/// "Welcome!"
/// }
///
@@ -302,7 +302,7 @@ where
/// ```rust
/// use actix_web::{web, App, HttpRequest, HttpResponse, Result};
///
/// fn index(req: HttpRequest) -> Result<HttpResponse> {
/// async fn index(req: HttpRequest) -> Result<HttpResponse> {
/// let url = req.url_for("youtube", &["asdlkjqme"])?;
/// assert_eq!(url.as_str(), "https://youtube.com/watch/asdlkjqme");
/// Ok(HttpResponse::Ok().into())
@@ -346,7 +346,7 @@ where
/// use actix_web::{middleware, web, App};
/// use actix_web::http::{header::CONTENT_TYPE, HeaderValue};
///
/// fn index() -> &'static str {
/// async fn index() -> &'static str {
/// "Welcome!"
/// }
///
@@ -404,7 +404,7 @@ where
/// use actix_web::{web, App};
/// use actix_web::http::{header::CONTENT_TYPE, HeaderValue};
///
/// fn index() -> &'static str {
/// async fn index() -> &'static str {
/// "Welcome!"
/// }
///