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.