From fb3de4ce6db9e85ed1ece18d614df47e55ea3c27 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sat, 20 Jan 2018 21:24:42 +0100 Subject: 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 --- askama_shared/src/generator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'askama_shared/src') 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(); -- cgit