From 4d9dd30c72e0c75d93f857ac65fa2a5efb5fd331 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 7 Dec 2021 21:50:20 +0000 Subject: [PATCH] fix doc test --- src/request_data.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/request_data.rs b/src/request_data.rs index 71937266..680f3e56 100644 --- a/src/request_data.rs +++ b/src/request_data.rs @@ -33,12 +33,11 @@ use crate::{dev::Payload, error::ErrorInternalServerError, Error, FromRequest, H /// req: HttpRequest, /// opt_flag: Option>, /// ) -> impl Responder { -/// // use an optional extractor if the middleware is -/// // not guaranteed to add this type of requests data +/// // use an option extractor if middleware is not guaranteed to add this type of req data /// if let Some(flag) = opt_flag { -/// assert_eq!(&flag.into_inner(), req.extensions().get::().unwrap()); +/// assert_eq!(&flag.into_inner(), req.req_data().get::().unwrap()); /// } -/// +/// /// HttpResponse::Ok() /// } /// ```