diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-16 20:51:49 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-16 20:51:49 +0200 |
commit | f15da8ba3e62c76d23ea4ad87e5f45275885a016 (patch) | |
tree | 89447dc1ff9f44993ed5108ad43d5210819e07f8 /askama_derive/src/generator.rs | |
parent | 7efd70297d12a643b858f006006c04b5d86b7d92 (diff) | |
download | askama-f15da8ba3e62c76d23ea4ad87e5f45275885a016.tar.gz askama-f15da8ba3e62c76d23ea4ad87e5f45275885a016.tar.bz2 askama-f15da8ba3e62c76d23ea4ad87e5f45275885a016.zip |
Change find_template_from_path() to take Path as start_at argument
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/generator.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Node>) -> Str fn trait_name_for_path(base: &Option<Expr>, 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(); |