From 31b90ccc657a5468de6bdffea8d309f502cd0d07 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Jun 2018 12:19:54 +0200 Subject: Fix formatting with cargo fmt --- testing/tests/inheritance.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'testing/tests/inheritance.rs') diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 6e032ba..2fd69c6 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -23,14 +23,15 @@ fn test_use_base_directly() { #[test] fn test_simple_extends() { - let t = ChildTemplate { _parent: BaseTemplate { title: "Bar" } }; + let t = ChildTemplate { + _parent: BaseTemplate { title: "Bar" }, + }; assert_eq!( t.render().unwrap(), "Bar\n(Bar) Content goes here\nFoo\nCopyright 2017" ); } - pub mod parent { use askama::Template; #[derive(Template)] @@ -41,8 +42,8 @@ pub mod parent { } pub mod child { - use askama::Template; use super::parent::*; + use askama::Template; #[derive(Template)] #[template(path = "child.html")] pub struct ChildTemplate<'a> { @@ -52,15 +53,15 @@ pub mod child { #[test] fn test_different_module() { - let t = child::ChildTemplate { _parent: parent::BaseTemplate { title: "a" } }; + let t = child::ChildTemplate { + _parent: parent::BaseTemplate { title: "a" }, + }; assert_eq!( t.render().unwrap(), "a\n(a) Content goes here\nFoo\nCopyright 2017" ); } - - #[derive(Template)] #[template(path = "nested-base.html")] struct NestedBaseTemplate {} @@ -73,6 +74,8 @@ struct NestedChildTemplate { #[test] fn test_nested_blocks() { - let t = NestedChildTemplate { _parent: NestedBaseTemplate {} }; + let t = NestedChildTemplate { + _parent: NestedBaseTemplate {}, + }; assert_eq!(t.render().unwrap(), "\ndurpy\n"); } -- cgit