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/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'askama_derive/src/lib.rs') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index 153e352..5ee5a4c 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -66,7 +66,8 @@ fn get_template_meta(ast: &syn::DeriveInput) -> TemplateMeta { /// value as passed to the `template()` attribute. fn build_template(ast: &syn::DeriveInput) -> String { let meta = get_template_meta(ast); - let src = path::get_template_source(&meta.path); + let path = path::find_template_from_path(&meta.path, None); + let src = path::get_template_source(&path); let nodes = parser::parse(&src); if meta.print == "ast" || meta.print == "all" { println!("{:?}", nodes); -- cgit