aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-10 15:40:56 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-10 15:40:56 +0100
commitb083ea5e110314bb02530e3a660e5a3d5d72d1e0 (patch)
tree49e92d686b3c3895d8e272103f995961ae515055 /askama_shared
parent325cb975a35579aaad273fc82c1ecc05a31ebe52 (diff)
downloadaskama-b083ea5e110314bb02530e3a660e5a3d5d72d1e0.tar.gz
askama-b083ea5e110314bb02530e3a660e5a3d5d72d1e0.tar.bz2
askama-b083ea5e110314bb02530e3a660e5a3d5d72d1e0.zip
Rename Config::from_file() to Config::new()
Diffstat (limited to 'askama_shared')
-rw-r--r--askama_shared/src/path.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/askama_shared/src/path.rs b/askama_shared/src/path.rs
index f6eef40..bc329e5 100644
--- a/askama_shared/src/path.rs
+++ b/askama_shared/src/path.rs
@@ -27,7 +27,7 @@ pub fn find_template_from_path(path: &str, start_at: Option<&Path>) -> PathBuf {
}
}
- let config = Config::from_file();
+ let config = Config::new();
for dir in &config.dirs {
let rooted = dir.join(path);
if rooted.exists() {
@@ -39,7 +39,7 @@ pub fn find_template_from_path(path: &str, start_at: Option<&Path>) -> PathBuf {
}
pub fn template_dirs() -> Vec<PathBuf> {
- Config::from_file().dirs
+ Config::new().dirs
}
struct Config {
@@ -47,7 +47,7 @@ struct Config {
}
impl Config {
- fn from_file() -> Config {
+ fn new() -> Config {
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
let filename = root.join(CONFIG_FILE_NAME);