From b083ea5e110314bb02530e3a660e5a3d5d72d1e0 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 10 Jul 2018 15:40:56 +0100 Subject: Rename Config::from_file() to Config::new() --- askama_shared/src/path.rs | 6 +++--- 1 file 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 { - 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); -- cgit