diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2022-01-06 14:55:29 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-01-06 15:12:42 +0100 |
commit | 8b4cc660a95d7ffa2d3f03efcea36048a425e762 (patch) | |
tree | 93493df22136165dccdc734e0284604edadb2fe9 /askama_shared/src | |
parent | b7b5ff0633092006205ccfca9febab0978c0c957 (diff) | |
download | askama-8b4cc660a95d7ffa2d3f03efcea36048a425e762.tar.gz askama-8b4cc660a95d7ffa2d3f03efcea36048a425e762.tar.bz2 askama-8b4cc660a95d7ffa2d3f03efcea36048a425e762.zip |
Remove the iron integration from generator
Issue #527 removed the askama_iron package, but not the integration if
someone uses askama_derive's feature with "iron".
The old askama_iron crate uses askama v0.10, so it will still work.
Diffstat (limited to '')
-rw-r--r-- | askama_shared/src/generator.rs | 26 | ||||
-rw-r--r-- | askama_shared/src/lib.rs | 1 |
2 files changed, 0 insertions, 27 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index 8b1fb33..b891d89 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -102,9 +102,6 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> { if self.integrations.gotham { self.impl_gotham_into_response(&mut buf)?; } - if self.integrations.iron { - self.impl_iron_modifier_response(&mut buf)?; - } if self.integrations.mendes { self.impl_mendes_responder(&mut buf)?; } @@ -237,29 +234,6 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> { buf.writeln("}") } - // Implement iron's Modifier<Response> if enabled - fn impl_iron_modifier_response(&mut self, buf: &mut Buffer) -> Result<(), CompileError> { - self.write_header( - buf, - "::askama_iron::Modifier<::askama_iron::Response>", - None, - )?; - buf.writeln("fn modify(self, res: &mut ::askama_iron::Response) {")?; - buf.writeln( - "res.body = Some(Box::new(::askama_iron::Template::render(&self).unwrap().into_bytes()));", - )?; - - match self.input.extension().unwrap_or("") { - "html" | "htm" => { - buf.writeln("::askama_iron::ContentType::html().0.modify(res);")?; - } - _ => (), - }; - - buf.writeln("}")?; - buf.writeln("}") - } - // Implement mendes' `Responder`. fn impl_mendes_responder(&mut self, buf: &mut Buffer) -> Result<(), CompileError> { let param = syn::parse_str("A: ::mendes::Application").unwrap(); diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index 0768ff3..f6b94dd 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -278,7 +278,6 @@ pub struct Integrations { pub actix: bool, pub axum: bool, pub gotham: bool, - pub iron: bool, pub mendes: bool, pub rocket: bool, pub tide: bool, |