aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-05-24 21:38:59 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-05-24 21:38:59 +0200
commite557c493cd2795027cedb140f2f4eb39fbd2d3b4 (patch)
tree0f99e21f18a7cb711a7cb683e72fcfa54a21df45 /askama_derive
parentdd35f82534303c98f4ba5ce8b68ad19a6d65f83e (diff)
downloadaskama-e557c493cd2795027cedb140f2f4eb39fbd2d3b4.tar.gz
askama-e557c493cd2795027cedb140f2f4eb39fbd2d3b4.tar.bz2
askama-e557c493cd2795027cedb140f2f4eb39fbd2d3b4.zip
Rename lifetime to 'askama to prevent conflicts (fixes #88)
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 30acac5..1049d17 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -292,11 +292,11 @@ impl<'a> Generator<'a> {
// Implement Rocket's `Responder`.
fn impl_responder(&mut self, state: &'a State) {
- let lifetime = syn::Lifetime::new("'r", Span::call_site());
+ let lifetime = syn::Lifetime::new("'askama", Span::call_site());
let param = syn::GenericParam::Lifetime(syn::LifetimeDef::new(lifetime));
- self.write_header(state, "::askama::rocket::Responder<'r>", Some(vec![param]));
+ self.write_header(state, "::askama::rocket::Responder<'askama>", Some(vec![param]));
self.writeln("fn respond_to(self, _: &::askama::rocket::Request) \
- -> ::askama::rocket::Result<'r> {");
+ -> ::askama::rocket::Result<'askama> {");
let ext = match state.input.path.extension() {
Some(s) => s.to_str().unwrap(),