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:
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,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue