mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 09:42:40 +01:00
remove Clone from ExtractorConfig
This commit is contained in:
parent
ea118edf56
commit
9d114d785e
@ -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 New Issue
Block a user