aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
Diffstat (limited to 'askama_derive/src/generator.rs')
-rw-r--r--askama_derive/src/generator.rs4
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();