aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-22 14:05:11 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-22 14:05:11 +0200
commita451bf29b607f7e47cd1e674a1adf490a2496af2 (patch)
treeaa9ad16c766361064b0797708a04ca2cdae3fa10 /askama_derive
parent06fd5188056fa59ee194ce1f031e4160e550383c (diff)
downloadaskama-a451bf29b607f7e47cd1e674a1adf490a2496af2.tar.gz
askama-a451bf29b607f7e47cd1e674a1adf490a2496af2.tar.bz2
askama-a451bf29b607f7e47cd1e674a1adf490a2496af2.zip
Fix formatting with cargo fmt
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs2
-rw-r--r--askama_derive/src/lib.rs10
2 files changed, 7 insertions, 5 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 86fd9f5..e2c77f3 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -911,7 +911,7 @@ impl<'a> Heritage<'a> {
Heritage {
root: ctx,
levels,
- blocks
+ blocks,
}
}
}
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index ad1c123..7c0387f 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -144,10 +144,12 @@ impl<'a> Context<'a> {
let blocks: HashMap<_, _> = blocks
.iter()
- .map(|def| if let Node::BlockDef(_, name, _, _) = def {
- (*name, *def)
- } else {
- unreachable!()
+ .map(|def| {
+ if let Node::BlockDef(_, name, _, _) = def {
+ (*name, *def)
+ } else {
+ unreachable!()
+ }
})
.collect();