From b318d7cbcded2c6dfc66bbe19687f1246a9a9eab Mon Sep 17 00:00:00 2001 From: Shritesh Bhattarai Date: Tue, 15 Jun 2021 09:45:19 -0400 Subject: Support rocket 0.5.0-rc.1 based on @flo-l's PR (#495) See #412 for earlier iteration. --- askama_shared/src/generator.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'askama_shared/src') 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(()) -- cgit