From f15da8ba3e62c76d23ea4ad87e5f45275885a016 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 16 Aug 2017 20:51:49 +0200 Subject: Change find_template_from_path() to take Path as start_at argument --- askama_derive/src/generator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'askama_derive/src/generator.rs') diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 43c2a49..5eb456b 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -4,7 +4,7 @@ use path; use quote::{Tokens, ToTokens}; use std::{cmp, hash, str}; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::collections::HashSet; use syn; @@ -55,7 +55,7 @@ pub fn generate(ast: &syn::DeriveInput, path: &str, mut nodes: Vec) -> Str fn trait_name_for_path(base: &Option, path: &str) -> String { let rooted_path = match *base { Some(Expr::StrLit(user_path)) => { - path::find_template_from_path(user_path, Some(path)) + path::find_template_from_path(user_path, Some(Path::new(path))) }, _ => { let mut path_buf = PathBuf::new(); -- cgit