update examples

This commit is contained in:
Ibraheem Ahmed 2021-06-22 11:44:53 -04:00 committed by GitHub
parent cb2d7b5dbe
commit ac9509649e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -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() {