mirror of https://github.com/fafhrd91/actix-web
remove config from new extractors
This commit is contained in:
parent
758e306069
commit
905f5ebb9b
|
@ -250,7 +250,6 @@ where
|
||||||
impl FromRequest for Uri {
|
impl FromRequest for Uri {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
type Future = Ready<Result<Self, Self::Error>>;
|
type Future = Ready<Result<Self, Self::Error>>;
|
||||||
type Config = ();
|
|
||||||
|
|
||||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||||
ok(req.uri().clone())
|
ok(req.uri().clone())
|
||||||
|
@ -272,7 +271,6 @@ impl FromRequest for Uri {
|
||||||
impl FromRequest for Method {
|
impl FromRequest for Method {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
type Future = Ready<Result<Self, Self::Error>>;
|
type Future = Ready<Result<Self, Self::Error>>;
|
||||||
type Config = ();
|
|
||||||
|
|
||||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||||
ok(req.method().clone())
|
ok(req.method().clone())
|
||||||
|
|
|
@ -209,7 +209,6 @@ impl ConnectionInfo {
|
||||||
impl FromRequest for ConnectionInfo {
|
impl FromRequest for ConnectionInfo {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
type Future = Ready<Result<Self, Self::Error>>;
|
type Future = Ready<Result<Self, Self::Error>>;
|
||||||
type Config = ();
|
|
||||||
|
|
||||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||||
ok(req.connection_info().clone())
|
ok(req.connection_info().clone())
|
||||||
|
@ -252,7 +251,6 @@ impl ResponseError for MissingPeerAddr {}
|
||||||
impl FromRequest for PeerAddr {
|
impl FromRequest for PeerAddr {
|
||||||
type Error = MissingPeerAddr;
|
type Error = MissingPeerAddr;
|
||||||
type Future = Ready<Result<Self, Self::Error>>;
|
type Future = Ready<Result<Self, Self::Error>>;
|
||||||
type Config = ();
|
|
||||||
|
|
||||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
|
||||||
match req.peer_addr() {
|
match req.peer_addr() {
|
||||||
|
|
Loading…
Reference in New Issue