From ac9509649e0cef5333938d554366fe7dc0191fc2 Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Tue, 22 Jun 2021 11:44:53 -0400 Subject: [PATCH] update examples --- src/extract.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/extract.rs b/src/extract.rs index 275268aed..dda10caab 100644 --- a/src/extract.rs +++ b/src/extract.rs @@ -225,9 +225,8 @@ where /// ``` /// use actix_web::{web, App, HttpRequest, http::Uri}; /// -/// async fn index(uri: Uri) -> &'static str { -/// log::info!("Incoming request to: {}", uri.path()); -/// "Welcome!" +/// async fn index(uri: Uri) -> String { +/// format!("Requested path: {}", uri.path()) /// } /// /// fn main() { @@ -251,9 +250,8 @@ impl FromRequest for Uri { /// ``` /// use actix_web::{web, App, HttpRequest, http::Method}; /// -/// async fn index(method: Method) -> &'static str { -/// assert_eq!(method, Method::GET); -/// "Welcome!" +/// async fn index(method: Method) -> String { +/// format!("Request method: {}", method) /// } /// /// fn main() {