From 077c56c00782ff826e46258f678ef0f163f4e3cb Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 6 Aug 2017 14:56:09 +0200 Subject: Use one way of finding templates on the path --- askama_derive/src/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'askama_derive/src/parser.rs') diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs index ad23cce..767371b 100644 --- a/askama_derive/src/parser.rs +++ b/askama_derive/src/parser.rs @@ -1,5 +1,6 @@ use nom::{self, IResult}; use path; +use std::path::Path; use std::str; #[derive(Debug)] @@ -324,7 +325,7 @@ named!(block_include, do_parse!( name: ws!(expr_str_lit) >> nws: opt!(tag_s!("-")) >> (Node::Include(WS(pws.is_some(), nws.is_some()), match name { - Expr::StrLit(s) => path::get_template_source(s), + Expr::StrLit(s) => path::get_template_source(Path::new(s)), _ => panic!("include path must be a string literal"), })) )); -- cgit