1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-30 12:00:38 +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,
T: FromRequest<S> + 'static,
{
let cfg = ExtractorConfig::default();
self.h(With::new(handler, Clone::clone(&cfg)));
let cfg = ExtractorConfig::<S, T>::default();
self.h(With::new(handler, cfg.clone()));
cfg
}
@ -212,8 +212,8 @@ impl<S: 'static> Route<S> {
E: Into<Error> + 'static,
T: FromRequest<S> + 'static,
{
let cfg = ExtractorConfig::default();
self.h(WithAsync::new(handler, Clone::clone(&cfg)));
let cfg = ExtractorConfig::<S, T>::default();
self.h(WithAsync::new(handler, cfg.clone()));
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> {
fn clone(&self) -> Self {
impl<S: 'static, T: FromRequest<S>> ExtractorConfig<S, T> {
pub(crate) fn clone(&self) -> Self {
ExtractorConfig {
cfg: Rc::clone(&self.cfg),
}