aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Juan Aguilar Santillana <mhpoin@gmail.com>2018-12-12 22:30:57 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-12-13 09:32:03 +0100
commit39e08325c0e0fba75384579427d1c6f7eca8fbc9 (patch)
tree317b3f5dc122d6c99cf301fb7de8fb88c88c3690 /askama_derive/src/generator.rs
parent65b4f6aae7f83df02449f21d857e640911975a36 (diff)
downloadaskama-39e08325c0e0fba75384579427d1c6f7eca8fbc9.tar.gz
askama-39e08325c0e0fba75384579427d1c6f7eca8fbc9.tar.bz2
askama-39e08325c0e0fba75384579427d1c6f7eca8fbc9.zip
fix rust macro arguments
Diffstat (limited to 'askama_derive/src/generator.rs')
-rw-r--r--askama_derive/src/generator.rs10
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