aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
Diffstat (limited to 'askama_derive/src')
-rw-r--r--askama_derive/src/generator.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 07a90e5..5a136fb 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -435,18 +435,21 @@ impl<'a> Generator<'a> {
.contexts
.get(path)
.unwrap_or_else(|| panic!("context for '{:?}' not found", path));
- (mctx.macros
- .get(name)
- .unwrap_or_else(|| panic!("macro '{}' not found in scope '{}'", s, name)),
- mctx)
+ (
+ mctx.macros
+ .get(name)
+ .unwrap_or_else(|| panic!("macro '{}' not found in scope '{}'", s, name)),
+ mctx,
+ )
} else {
- (ctx.macros
- .get(name)
- .unwrap_or_else(|| panic!("macro '{}' not found", name)),
- ctx)
+ (
+ ctx.macros
+ .get(name)
+ .unwrap_or_else(|| panic!("macro '{}' not found", name)),
+ ctx,
+ )
};
-
self.flush_ws(buf, ws); // Cannot handle_ws() here: whitespace from macro definition comes first
self.locals.push();
buf.writeln("{");