aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-22 16:23:20 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-06-22 16:23:20 +0200
commit457ecee0756bd95ac1277dbe29663b2fd6d221a1 (patch)
treeda8d8243c9b1a344964e99c3b17fcacfedab5fc5 /testing
parentb641f70adc3847e9a45a106d1b2ca97e597baae6 (diff)
downloadaskama-457ecee0756bd95ac1277dbe29663b2fd6d221a1.tar.gz
askama-457ecee0756bd95ac1277dbe29663b2fd6d221a1.tar.bz2
askama-457ecee0756bd95ac1277dbe29663b2fd6d221a1.zip
Fix formatting with cargo fmt
Diffstat (limited to '')
-rw-r--r--testing/tests/inheritance.rs54
1 files changed, 33 insertions, 21 deletions
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(),
+ "
<html>
<head>
@@ -133,8 +133,11 @@ fn test_deep() {
</div>
</body>
-</html>");
- assert_eq!(t._parent.render().unwrap(), "
+</html>"
+ );
+ assert_eq!(
+ t._parent.render().unwrap(),
+ "
<html>
<head>
@@ -155,8 +158,11 @@ fn test_deep() {
</div>
</body>
-</html>");
- assert_eq!(t._parent._parent.render().unwrap(), "
+</html>"
+ );
+ assert_eq!(
+ t._parent._parent.render().unwrap(),
+ "
<html>
<head>
@@ -169,7 +175,8 @@ fn test_deep() {
Copyright 2018
</body>
-</html>");
+</html>"
+ );
}
#[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(),
+ "
<html>
<head>
@@ -217,12 +224,15 @@ fn test_flat_deep() {
</div>
</body>
-</html>");
+</html>"
+ );
let t = FlatDeepMidTemplate {
title: "Test".into(),
};
- assert_eq!(t.render().unwrap(), "
+ assert_eq!(
+ t.render().unwrap(),
+ "
<html>
<head>
@@ -243,12 +253,13 @@ fn test_flat_deep() {
</div>
</body>
-</html>");
+</html>"
+ );
- let t = FlatDeepBaseTemplate {
- year: 2018,
- };
- assert_eq!(t.render().unwrap(), "
+ let t = FlatDeepBaseTemplate { year: 2018 };
+ assert_eq!(
+ t.render().unwrap(),
+ "
<html>
<head>
@@ -261,5 +272,6 @@ fn test_flat_deep() {
Copyright 2018
</body>
-</html>");
+</html>"
+ );
}