From 987354946cde37ddd05d5316f7b581c9dd6f0131 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 11 Jul 2018 22:25:10 +0100 Subject: Fix formatting with cargo fmt --- askama_shared/src/lib.rs | 2 +- askama_shared/src/path.rs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'askama_shared') 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)] -- cgit