aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-01-20 21:24:42 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-01-20 21:27:21 +0100
commitfb3de4ce6db9e85ed1ece18d614df47e55ea3c27 (patch)
tree6b7902ae5f42b81bbb7eba0230dd0a6f9b6fa5f8
parent8f216fed4c51f470777a004317ecc09869728fb7 (diff)
downloadaskama-fb3de4ce6db9e85ed1ece18d614df47e55ea3c27.tar.gz
askama-fb3de4ce6db9e85ed1ece18d614df47e55ea3c27.tar.bz2
askama-fb3de4ce6db9e85ed1ece18d614df47e55ea3c27.zip
Use push() instead of push_value() to add type parameters (fixes #65)
push_value() requires taking care of the surrounding punctuation, which push() should handle for us. See this issue reported in syn: https://github.com/dtolnay/syn/issues/338
-rw-r--r--askama_shared/src/generator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 173ecbf..e173c45 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -285,7 +285,7 @@ impl<'a> Generator<'a> {
fn write_header(&mut self, state: &'a State, target: &str, vars: &[Tokens]) {
let mut generics = state.input.ast.generics.clone();
for v in vars.iter() {
- generics.params.push_value(parse_quote!(#v));
+ generics.params.push(parse_quote!(#v));
}
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
let ident = state.input.ast.ident.as_ref();