mirror of
https://github.com/actix/actix-web.git
synced 2024-12-21 23:56:35 +00:00
remove Clone from ExtractorConfig
This commit is contained in:
parent
ea118edf56
commit
9d114d785e
2 changed files with 6 additions and 6 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue