aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Shritesh Bhattarai <shritesh@shritesh.com>2021-06-15 09:45:19 -0400
committerLibravatar GitHub <noreply@github.com>2021-06-15 15:45:19 +0200
commitb318d7cbcded2c6dfc66bbe19687f1246a9a9eab (patch)
treeaf453e71287c9fdc8530526609b3c3c4bf3c32fa /askama_shared/src/generator.rs
parent25eae265a2d14a33a1723bfa0c5dc7a7f6b5a6ab (diff)
downloadaskama-b318d7cbcded2c6dfc66bbe19687f1246a9a9eab.tar.gz
askama-b318d7cbcded2c6dfc66bbe19687f1246a9a9eab.tar.bz2
askama-b318d7cbcded2c6dfc66bbe19687f1246a9a9eab.zip
Support rocket 0.5.0-rc.1 based on @flo-l's PR (#495)
See #412 for earlier iteration.
Diffstat (limited to 'askama_shared/src/generator.rs')
-rw-r--r--askama_shared/src/generator.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 4bd2a63..638a25f 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -313,17 +313,15 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
let param = syn::GenericParam::Lifetime(syn::LifetimeDef::new(lifetime));
self.write_header(
buf,
- "::askama_rocket::Responder<'askama>",
+ "::askama_rocket::Responder<'askama, 'static>",
Some(vec![param]),
)?;
buf.writeln(
"fn respond_to(self, _: &::askama_rocket::Request) \
- -> ::askama_rocket::Result<'askama> {",
+ -> ::askama_rocket::Result<'static> {",
)?;
-
let ext = self.input.extension().unwrap_or("txt");
buf.writeln(&format!("::askama_rocket::respond(&self, {:?})", ext))?;
-
buf.writeln("}")?;
buf.writeln("}")?;
Ok(())