aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-10-20 10:11:19 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-10-20 10:11:19 +0200
commitfef994d2f678a56b08f37043c306cfbf4a93427b (patch)
tree0d2eb97fe97743e6a0bb9dc4ef7a143a9f31cfd2 /askama_shared
parent4af73a868c7d35641f8a1bcd0a82f8c7db411d8d (diff)
downloadaskama-fef994d2f678a56b08f37043c306cfbf4a93427b.tar.gz
askama-fef994d2f678a56b08f37043c306cfbf4a93427b.tar.bz2
askama-fef994d2f678a56b08f37043c306cfbf4a93427b.zip
Tighten up parser code for path expressions
Diffstat (limited to 'askama_shared')
-rw-r--r--askama_shared/src/parser.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs
index accefd2..eff1779 100644
--- a/askama_shared/src/parser.rs
+++ b/askama_shared/src/parser.rs
@@ -162,10 +162,8 @@ named!(expr_path<Expr>, do_parse!(
(part)
)) >>
({
- let mut path = vec![ start ];
- for part in rest.iter() {
- path.push(part);
- }
+ let mut path = vec![start];
+ path.extend(rest);
Expr::Path(path)
})
));