aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-01-07 22:24:05 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-01-07 22:24:05 +0100
commit9c44d03a77a18914872b0d60e2341037a64e3f9a (patch)
tree58738e912e284f0adae83c77c9ffa1578a1dc1dc
parent01ca5d6c84770d82a1b20d792bb7e5441d92df44 (diff)
downloadaskama-9c44d03a77a18914872b0d60e2341037a64e3f9a.tar.gz
askama-9c44d03a77a18914872b0d60e2341037a64e3f9a.tar.bz2
askama-9c44d03a77a18914872b0d60e2341037a64e3f9a.zip
Simplify parser by using type alias
Diffstat (limited to '')
-rw-r--r--askama/src/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/askama/src/parser.rs b/askama/src/parser.rs
index dd7fdd8..89fccff 100644
--- a/askama/src/parser.rs
+++ b/askama/src/parser.rs
@@ -98,12 +98,12 @@ named!(block_if<Node>, do_parse!(
Node::Cond(res)
})));
-named!(parse_template< Vec<Node> >, many1!(alt!(
+named!(parse_template<Nodes>, many1!(alt!(
take_content |
expr_node |
block_if)));
-pub fn parse<'a>(src: &'a str) -> Vec<Node> {
+pub fn parse<'a>(src: &'a str) -> Nodes {
match parse_template(src.as_bytes()) {
IResult::Done(_, res) => res,
IResult::Error(err) => panic!("problems parsing template source: {}", err),