From 29a0feb4159712090800bdd3ff2d7c0a6d98bdb6 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 27 Mar 2018 07:47:29 -0700 Subject: [PATCH] fix guide example --- guide/src/qs_5.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guide/src/qs_5.md b/guide/src/qs_5.md index 3480252c..c3f93c4e 100644 --- a/guide/src/qs_5.md +++ b/guide/src/qs_5.md @@ -337,7 +337,6 @@ from *serde* libary. # extern crate futures; #[macro_use] extern crate serde_derive; use actix_web::*; -use actix_web::dev::{Path, HttpRequestExtractor}; #[derive(Deserialize)] struct Info { @@ -345,7 +344,7 @@ struct Info { } fn index(mut req: HttpRequest) -> Result { - let info: Info = Path.extract(&req)?; // <- extract path info using serde + let info: Info = req.extract_path()?; // <- extract path info using serde Ok(format!("Welcome {}!", info.username)) }