aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/path.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-21 12:19:54 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-21 12:19:54 +0200
commit31b90ccc657a5468de6bdffea8d309f502cd0d07 (patch)
tree5b5689f15dfb2cdcc27eca10ef39212dd18db4f2 /askama_shared/src/path.rs
parentf05a924c49afb537b624cfe3cbef3a95b13759a2 (diff)
downloadaskama-31b90ccc657a5468de6bdffea8d309f502cd0d07.tar.gz
askama-31b90ccc657a5468de6bdffea8d309f502cd0d07.tar.bz2
askama-31b90ccc657a5468de6bdffea8d309f502cd0d07.zip
Fix formatting with cargo fmt
Diffstat (limited to '')
-rw-r--r--askama_shared/src/path.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/askama_shared/src/path.rs b/askama_shared/src/path.rs
index c84575f..8b92250 100644
--- a/askama_shared/src/path.rs
+++ b/askama_shared/src/path.rs
@@ -10,7 +10,7 @@ pub fn get_template_source(tpl_path: &Path) -> String {
Err(_) => {
let msg = format!("unable to open template file '{}'", &path.to_str().unwrap());
panic!(msg)
- },
+ }
Ok(f) => f,
};
let mut s = String::new();
@@ -38,7 +38,11 @@ pub fn find_template_from_path(path: &str, start_at: Option<&Path>) -> PathBuf {
if fs_abs_path.exists() {
path.to_owned()
} else {
- panic!(format!("template {:?} not found at {:?}", path.to_str().unwrap(), fs_abs_path));
+ panic!(format!(
+ "template {:?} not found at {:?}",
+ path.to_str().unwrap(),
+ fs_abs_path
+ ));
}
}
@@ -50,8 +54,8 @@ pub fn template_dir() -> PathBuf {
#[cfg(test)]
mod tests {
- use super::{find_template_from_path, get_template_source};
use super::Path;
+ use super::{find_template_from_path, get_template_source};
#[test]
fn get_source() {