From 6d3cd374acd50c3b35f657d474a305fd416ca038 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Tue, 18 Jul 2017 14:27:10 -0400 Subject: [PATCH] Fix the 'user_id' route in cookies guide. --- site/guide/requests.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/site/guide/requests.md b/site/guide/requests.md index 67418baa..9fd3ae14 100644 --- a/site/guide/requests.md +++ b/site/guide/requests.md @@ -402,9 +402,8 @@ methods are suffixed with `_private`. These methods are: [`get_private`], /// Retrieve the user's ID, if any. #[get("/user_id")] fn user_id(cookies: Cookies) -> Option { - request.cookies() - .get_private("user_id") - .map(|cookie| format!("User ID: {}", cookie.value())) + cookies.get_private("user_id") + .map(|cookie| format!("User ID: {}", cookie.value())) } /// Remove the `user_id` cookie.