aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_shared/src/lib.rs2
-rw-r--r--askama_shared/src/path.rs10
2 files changed, 9 insertions, 3 deletions
diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs
index e379b72..2c2a88f 100644
--- a/askama_shared/src/lib.rs
+++ b/askama_shared/src/lib.rs
@@ -11,8 +11,8 @@ use std::env;
use std::fs;
use std::path::PathBuf;
-mod escaping;
mod error;
+mod escaping;
pub use error::{Error, Result};
pub use escaping::MarkupDisplay;
diff --git a/askama_shared/src/path.rs b/askama_shared/src/path.rs
index 43f8fdf..568437f 100644
--- a/askama_shared/src/path.rs
+++ b/askama_shared/src/path.rs
@@ -5,7 +5,10 @@ use std::path::{Path, PathBuf};
pub fn get_template_source(tpl_path: &Path) -> String {
match fs::read_to_string(tpl_path) {
- Err(_) => panic!("unable to open template file '{}'", tpl_path.to_str().unwrap()),
+ Err(_) => panic!(
+ "unable to open template file '{}'",
+ tpl_path.to_str().unwrap()
+ ),
Ok(mut source) => {
if source.ends_with('\n') {
let _ = source.pop();
@@ -31,7 +34,10 @@ pub fn find_template_from_path(path: &str, start_at: Option<&Path>) -> PathBuf {
}
}
- panic!("template {:?} not found in directories {:?}", path, config.dirs)
+ panic!(
+ "template {:?} not found in directories {:?}",
+ path, config.dirs
+ )
}
#[cfg(test)]