1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-22 08:07:18 +00:00

remove unneeded phantom data

This commit is contained in:
Nikolay Kim 2018-09-06 18:03:01 -07:00
parent 0525da70bf
commit d917b47868
3 changed files with 11 additions and 41 deletions

View file

@ -7,7 +7,7 @@ use {IntoNewService, NewService, Service};
pub struct Apply<T, F, R, Req> { pub struct Apply<T, F, R, Req> {
service: T, service: T,
f: F, f: F,
r: PhantomData<Fn(Req) -> R>, r: PhantomData<(Req, R)>,
} }
impl<T, F, R, Req> Apply<T, F, R, Req> impl<T, F, R, Req> Apply<T, F, R, Req>

View file

@ -14,9 +14,7 @@ where
Fut: IntoFuture<Item = Resp, Error = E>, Fut: IntoFuture<Item = Resp, Error = E>,
{ {
f: F, f: F,
req: marker::PhantomData<Req>, _t: marker::PhantomData<(Req, Resp, E)>,
resp: marker::PhantomData<Resp>,
err: marker::PhantomData<E>,
} }
impl<F, Req, Resp, E, Fut> FnService<F, Req, Resp, E, Fut> impl<F, Req, Resp, E, Fut> FnService<F, Req, Resp, E, Fut>
@ -27,9 +25,7 @@ where
pub fn new(f: F) -> Self { pub fn new(f: F) -> Self {
FnService { FnService {
f, f,
req: marker::PhantomData, _t: marker::PhantomData,
resp: marker::PhantomData,
err: marker::PhantomData,
} }
} }
} }
@ -42,9 +38,7 @@ where
fn clone(&self) -> Self { fn clone(&self) -> Self {
FnService { FnService {
f: self.f.clone(), f: self.f.clone(),
req: marker::PhantomData, _t: marker::PhantomData,
resp: marker::PhantomData,
err: marker::PhantomData,
} }
} }
} }
@ -84,10 +78,7 @@ where
Fut: IntoFuture<Item = Resp, Error = Err>, Fut: IntoFuture<Item = Resp, Error = Err>,
{ {
f: F, f: F,
req: marker::PhantomData<Req>, _t: marker::PhantomData<(Req, Resp, Err, IErr)>,
resp: marker::PhantomData<Resp>,
err: marker::PhantomData<Err>,
ierr: marker::PhantomData<IErr>,
} }
impl<F, Req, Resp, Err, IErr, Fut> FnNewService<F, Req, Resp, Err, IErr, Fut> impl<F, Req, Resp, Err, IErr, Fut> FnNewService<F, Req, Resp, Err, IErr, Fut>
@ -98,10 +89,7 @@ where
pub fn new(f: F) -> Self { pub fn new(f: F) -> Self {
FnNewService { FnNewService {
f, f,
req: marker::PhantomData, _t: marker::PhantomData,
resp: marker::PhantomData,
err: marker::PhantomData,
ierr: marker::PhantomData,
} }
} }
} }

View file

@ -12,9 +12,7 @@ where
{ {
f: F, f: F,
state: S, state: S,
req: marker::PhantomData<Req>, _t: marker::PhantomData<(Req, Resp, Err)>,
resp: marker::PhantomData<Resp>,
err: marker::PhantomData<Err>,
} }
impl<S, F, Req, Resp, Err, Fut> FnStateService<S, F, Req, Resp, Err, Fut> impl<S, F, Req, Resp, Err, Fut> FnStateService<S, F, Req, Resp, Err, Fut>
@ -26,9 +24,7 @@ where
FnStateService { FnStateService {
f, f,
state, state,
req: marker::PhantomData, _t: marker::PhantomData,
resp: marker::PhantomData,
err: marker::PhantomData,
} }
} }
} }
@ -43,9 +39,7 @@ where
FnStateService { FnStateService {
f: self.f.clone(), f: self.f.clone(),
state: self.state.clone(), state: self.state.clone(),
req: marker::PhantomData, _t: marker::PhantomData,
resp: marker::PhantomData,
err: marker::PhantomData,
} }
} }
} }
@ -73,13 +67,7 @@ where
pub struct FnStateNewService<S, F1, F2, Req, Resp, Err1, Err2, Fut1, Fut2> { pub struct FnStateNewService<S, F1, F2, Req, Resp, Err1, Err2, Fut1, Fut2> {
f: F1, f: F1,
state: F2, state: F2,
s: marker::PhantomData<S>, _t: marker::PhantomData<(S, Req, Resp, Err1, Err2, Fut1, Fut2)>,
req: marker::PhantomData<Req>,
resp: marker::PhantomData<Resp>,
err1: marker::PhantomData<Err1>,
err2: marker::PhantomData<Err2>,
fut1: marker::PhantomData<Fut1>,
fut2: marker::PhantomData<Fut2>,
} }
impl<S, F1, F2, Req, Resp, Err1, Err2, Fut1, Fut2> impl<S, F1, F2, Req, Resp, Err1, Err2, Fut1, Fut2>
@ -89,13 +77,7 @@ impl<S, F1, F2, Req, Resp, Err1, Err2, Fut1, Fut2>
FnStateNewService { FnStateNewService {
f, f,
state, state,
s: marker::PhantomData, _t: marker::PhantomData,
req: marker::PhantomData,
resp: marker::PhantomData,
err1: marker::PhantomData,
err2: marker::PhantomData,
fut1: marker::PhantomData,
fut2: marker::PhantomData,
} }
} }
} }