From a61c5f50d3ecf5ee62f538ca4da3871e795f5f6a Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Sun, 12 Oct 2014 17:36:17 -0400 Subject: [PATCH] Don't require Sync for Write --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index da289be..3c9ab5d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,7 +79,7 @@ impl Clone for State { } } -impl Clone for Write { +impl Clone for Write { fn clone(&self) -> Write { Write { data: self.data.clone() } } @@ -108,7 +108,7 @@ impl PluginFor> for Read } impl PluginFor>> for Write - where D: Send + Sync, + where D: Send, P: Assoc { fn eval(req: &Request, _: Phantom>) -> Option>> { req.extensions.find::, Arc>>() @@ -144,14 +144,14 @@ impl> AfterMiddleware for Read { } } -impl> BeforeMiddleware for Write { +impl> BeforeMiddleware for Write { fn before(&self, req: &mut Request) -> IronResult<()> { req.extensions.insert::, Arc>>(self.data.clone()); Ok(()) } } -impl> AfterMiddleware for Write { +impl> AfterMiddleware for Write { fn after(&self, _: &mut Request, res: &mut Response) -> IronResult<()> { res.extensions.insert::, Arc>>(self.data.clone()); Ok(()) @@ -194,7 +194,7 @@ impl Read where D: Send + Sync, P: Assoc { } } -impl Write where D: Send + Sync, P: Assoc { +impl Write where D: Send, P: Assoc { /// Construct a new pair of `Write` that can be passed directly to `Chain::link`. /// /// The data is initialized with the passed-in value.