mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 00:50:20 +02:00
use custom request for FromRequest trait
This commit is contained in:
@@ -9,11 +9,11 @@ use actix_router::{Path, Url};
|
||||
use futures::future::{ok, FutureResult};
|
||||
|
||||
use crate::handler::FromRequest;
|
||||
use crate::service::ServiceRequest;
|
||||
use crate::service::ServiceFromRequest;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HttpRequest {
|
||||
head: Message<RequestHead>,
|
||||
pub(crate) head: Message<RequestHead>,
|
||||
pub(crate) path: Path<Url>,
|
||||
extensions: Rc<Extensions>,
|
||||
}
|
||||
@@ -145,7 +145,7 @@ impl<P> FromRequest<P> for HttpRequest {
|
||||
type Future = FutureResult<Self, Error>;
|
||||
|
||||
#[inline]
|
||||
fn from_request(req: &mut ServiceRequest<P>) -> Self::Future {
|
||||
fn from_request(req: &mut ServiceFromRequest<P>) -> Self::Future {
|
||||
ok(req.clone())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user