From 706a74d7651ed6a83d042787f17d1ed573831aae Mon Sep 17 00:00:00 2001 From: Jonathan Reem Date: Fri, 24 Oct 2014 21:50:50 -0400 Subject: [PATCH] (fix) Update for change in PluginFor::eval signature. --- .gitignore | 13 +------------ src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index a63dd0d..bc76917 100644 --- a/.gitignore +++ b/.gitignore @@ -11,16 +11,5 @@ *.dummy *.exe *-test -/bin/main -/bin/test-internal -/bin/test-external -/doc/ /target/ -/build/ -/.rust/ -rusti.sh -watch.sh -/examples/** -!/examples/*.rs -!/examples/assets/ -/deps/ +Cargo.lock diff --git a/src/lib.rs b/src/lib.rs index 3c9ab5d..61db0ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,7 +92,7 @@ impl Assoc>> for Write where P: Assoc {} impl PluginFor>> for State where D: Send + Sync, P: Assoc { - fn eval(req: &Request, _: Phantom>) -> Option>> { + fn eval(req: &mut Request, _: Phantom>) -> Option>> { req.extensions.find::, Arc>>() .map(|x| x.clone()) } @@ -101,7 +101,7 @@ impl PluginFor>> for State impl PluginFor> for Read where D: Send + Sync, P: Assoc { - fn eval(req: &Request, _: Phantom>) -> Option> { + fn eval(req: &mut Request, _: Phantom>) -> Option> { req.extensions.find::, Arc>() .map(|x| x.clone()) } @@ -110,7 +110,7 @@ impl PluginFor> for Read impl PluginFor>> for Write where D: Send, P: Assoc { - fn eval(req: &Request, _: Phantom>) -> Option>> { + fn eval(req: &mut Request, _: Phantom>) -> Option>> { req.extensions.find::, Arc>>() .map(|x| x.clone()) }