diff --git a/src/route.rs b/src/route.rs index 44ac8280..524b66ef 100644 --- a/src/route.rs +++ b/src/route.rs @@ -170,8 +170,8 @@ impl Route { R: Responder + 'static, T: FromRequest + 'static, { - let cfg = ExtractorConfig::default(); - self.h(With::new(handler, Clone::clone(&cfg))); + let cfg = ExtractorConfig::::default(); + self.h(With::new(handler, cfg.clone())); cfg } @@ -212,8 +212,8 @@ impl Route { E: Into + 'static, T: FromRequest + 'static, { - let cfg = ExtractorConfig::default(); - self.h(WithAsync::new(handler, Clone::clone(&cfg))); + let cfg = ExtractorConfig::::default(); + self.h(WithAsync::new(handler, cfg.clone())); cfg } } diff --git a/src/with.rs b/src/with.rs index c32f0a3b..4cb1546a 100644 --- a/src/with.rs +++ b/src/with.rs @@ -77,8 +77,8 @@ impl> Default for ExtractorConfig { } } -impl> Clone for ExtractorConfig { - fn clone(&self) -> Self { +impl> ExtractorConfig { + pub(crate) fn clone(&self) -> Self { ExtractorConfig { cfg: Rc::clone(&self.cfg), }