aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/loops.rs
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/loops.rs')
-rw-r--r--testing/tests/loops.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/testing/tests/loops.rs b/testing/tests/loops.rs
index 987f26a..32f0aca 100644
--- a/testing/tests/loops.rs
+++ b/testing/tests/loops.rs
@@ -11,11 +11,12 @@ struct ForTemplate<'a> {
#[test]
fn test_for() {
- let s = ForTemplate { strings: vec!["A", "alfa", "1"] };
+ let s = ForTemplate {
+ strings: vec!["A", "alfa", "1"],
+ };
assert_eq!(s.render().unwrap(), "0. A\n1. alfa\n2. 1\n");
}
-
#[derive(Template)]
#[template(path = "nested-for.html")]
struct NestedForTemplate<'a> {
@@ -26,6 +27,8 @@ struct NestedForTemplate<'a> {
fn test_nested_for() {
let alpha = vec!["a", "b", "c"];
let numbers = vec!["one", "two"];
- let s = NestedForTemplate { seqs: vec![&alpha, &numbers] };
+ let s = NestedForTemplate {
+ seqs: vec![&alpha, &numbers],
+ };
assert_eq!(s.render().unwrap(), "1\n 0a1b2c2\n 0one1two");
}