mirror of https://github.com/fafhrd91/actix-web
update examples
This commit is contained in:
parent
cb2d7b5dbe
commit
ac9509649e
|
@ -225,9 +225,8 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
/// use actix_web::{web, App, HttpRequest, http::Uri};
|
/// use actix_web::{web, App, HttpRequest, http::Uri};
|
||||||
///
|
///
|
||||||
/// async fn index(uri: Uri) -> &'static str {
|
/// async fn index(uri: Uri) -> String {
|
||||||
/// log::info!("Incoming request to: {}", uri.path());
|
/// format!("Requested path: {}", uri.path())
|
||||||
/// "Welcome!"
|
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
|
@ -251,9 +250,8 @@ impl FromRequest for Uri {
|
||||||
/// ```
|
/// ```
|
||||||
/// use actix_web::{web, App, HttpRequest, http::Method};
|
/// use actix_web::{web, App, HttpRequest, http::Method};
|
||||||
///
|
///
|
||||||
/// async fn index(method: Method) -> &'static str {
|
/// async fn index(method: Method) -> String {
|
||||||
/// assert_eq!(method, Method::GET);
|
/// format!("Request method: {}", method)
|
||||||
/// "Welcome!"
|
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
|
|
Loading…
Reference in New Issue