From 9d114d785e2403071ec08f24c7e2436f3a08593a Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Mon, 18 Jun 2018 00:19:07 +0600 Subject: [PATCH] remove Clone from ExtractorConfig --- src/route.rs | 8 ++++---- src/with.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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), }