From 32f0799ebb35677c57e18092e6f074cccc2e36ed Mon Sep 17 00:00:00 2001 From: Rudi Floren Date: Fri, 10 Feb 2023 13:39:24 +0100 Subject: Add impl From<{Template}> for hyper::Body derive with-hyper now derives an impl allowing Templates to be passed to functions with trait bounds for Into. --- askama_derive/src/generator.rs | 24 ++++++++++++++++++++++- askama_hyper/tests/basic.rs | 44 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 173fab1..762f356 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -426,12 +426,13 @@ impl<'a> Generator<'a> { buf.writeln("}") } - // Implement `From