aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-11 22:25:10 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-11 22:25:10 +0100
commit987354946cde37ddd05d5316f7b581c9dd6f0131 (patch)
tree6c5994498eda6b13511be10bd9c95b000b1a6c38 /askama_shared/src
parent88160e5d244e241537b78bf0bc8f2f9199f068d5 (diff)
downloadaskama-987354946cde37ddd05d5316f7b581c9dd6f0131.tar.gz
askama-987354946cde37ddd05d5316f7b581c9dd6f0131.tar.bz2
askama-987354946cde37ddd05d5316f7b581c9dd6f0131.zip
Fix formatting with cargo fmt
Diffstat (limited to 'askama_shared/src')
-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)]