diff options
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/generator.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 047e975..95a7d17 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -1,6 +1,8 @@ use super::{get_template_source, Context, Heritage}; use crate::input::TemplateInput; -use crate::parser::{Cond, Expr, MatchParameter, MatchParameters, MatchVariant, Node, Target, When, WS}; +use crate::parser::{ + Cond, Expr, MatchParameter, MatchParameters, MatchVariant, Node, Target, When, WS, +}; use askama_shared::filters; use proc_macro2::Span; @@ -773,14 +775,14 @@ impl<'a> Generator<'a> { Expr::MethodCall(ref obj, method, ref args) => { self.visit_method_call(buf, obj, method, args) } - Expr::RustMacro(name, ref args) => self.visit_rust_macro(buf, name, args), + Expr::RustMacro(name, args) => self.visit_rust_macro(buf, name, args), } } - fn visit_rust_macro(&mut self, buf: &mut Buffer, name: &str, args: &[Expr]) -> DisplayWrap { + fn visit_rust_macro(&mut self, buf: &mut Buffer, name: &str, args: &str) -> DisplayWrap { buf.write(name); buf.write("!("); - self._visit_args(buf, args); + buf.write(args); buf.write(")"); DisplayWrap::Unwrapped |