From 457ecee0756bd95ac1277dbe29663b2fd6d221a1 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 22 Jun 2018 16:23:20 +0200 Subject: Fix formatting with cargo fmt --- testing/tests/inheritance.rs | 54 +++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 21 deletions(-) (limited to 'testing/tests') diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 8b66a87..5eb42dd 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -104,15 +104,15 @@ struct DeepKidTemplate { fn test_deep() { let t = DeepKidTemplate { _parent: DeepMidTemplate { - _parent: DeepBaseTemplate { - year: 2018, - }, + _parent: DeepBaseTemplate { year: 2018 }, title: "Test".into(), }, item: "Foo".into(), }; - assert_eq!(t.render().unwrap(), " + assert_eq!( + t.render().unwrap(), + " @@ -133,8 +133,11 @@ fn test_deep() { -"); - assert_eq!(t._parent.render().unwrap(), " +" + ); + assert_eq!( + t._parent.render().unwrap(), + " @@ -155,8 +158,11 @@ fn test_deep() { -"); - assert_eq!(t._parent._parent.render().unwrap(), " +" + ); + assert_eq!( + t._parent._parent.render().unwrap(), + " @@ -169,7 +175,8 @@ fn test_deep() { Copyright 2018 -"); +" + ); } #[derive(Template)] @@ -192,11 +199,11 @@ struct FlatDeepKidTemplate { #[test] fn test_flat_deep() { - let t = FlatDeepKidTemplate { - item: "Foo".into(), - }; + let t = FlatDeepKidTemplate { item: "Foo".into() }; - assert_eq!(t.render().unwrap(), " + assert_eq!( + t.render().unwrap(), + " @@ -217,12 +224,15 @@ fn test_flat_deep() { -"); +" + ); let t = FlatDeepMidTemplate { title: "Test".into(), }; - assert_eq!(t.render().unwrap(), " + assert_eq!( + t.render().unwrap(), + " @@ -243,12 +253,13 @@ fn test_flat_deep() { -"); +" + ); - let t = FlatDeepBaseTemplate { - year: 2018, - }; - assert_eq!(t.render().unwrap(), " + let t = FlatDeepBaseTemplate { year: 2018 }; + assert_eq!( + t.render().unwrap(), + " @@ -261,5 +272,6 @@ fn test_flat_deep() { Copyright 2018 -"); +" + ); } -- cgit