1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-21 09:23:54 +00:00

remove Clone from ExtractorConfig

This commit is contained in:
Nikolay Kim 2018-06-18 00:19:07 +06:00
parent ea118edf56
commit 9d114d785e
2 changed files with 6 additions and 6 deletions

View file

@ -170,8 +170,8 @@ impl<S: 'static> Route<S> {
R: Responder + 'static, R: Responder + 'static,
T: FromRequest<S> + 'static, T: FromRequest<S> + 'static,
{ {
let cfg = ExtractorConfig::default(); let cfg = ExtractorConfig::<S, T>::default();
self.h(With::new(handler, Clone::clone(&cfg))); self.h(With::new(handler, cfg.clone()));
cfg cfg
} }
@ -212,8 +212,8 @@ impl<S: 'static> Route<S> {
E: Into<Error> + 'static, E: Into<Error> + 'static,
T: FromRequest<S> + 'static, T: FromRequest<S> + 'static,
{ {
let cfg = ExtractorConfig::default(); let cfg = ExtractorConfig::<S, T>::default();
self.h(WithAsync::new(handler, Clone::clone(&cfg))); self.h(WithAsync::new(handler, cfg.clone()));
cfg cfg
} }
} }

View file

@ -77,8 +77,8 @@ impl<S: 'static, T: FromRequest<S>> Default for ExtractorConfig<S, T> {
} }
} }
impl<S: 'static, T: FromRequest<S>> Clone for ExtractorConfig<S, T> { impl<S: 'static, T: FromRequest<S>> ExtractorConfig<S, T> {
fn clone(&self) -> Self { pub(crate) fn clone(&self) -> Self {
ExtractorConfig { ExtractorConfig {
cfg: Rc::clone(&self.cfg), cfg: Rc::clone(&self.cfg),
} }