on master help sign in
update snapshot tests
commit2339d78bf4cb32a5aa54699bc97ffe6c369eec69 authorDiva M <divma@protonmail.com> dateFri 15 Oct 2021, 16:43 (5 years ago) parent3a3cd0a
34 files changed+408−374
tests/snapshots/output/changes.snapshot.txt+1 tests/snapshots/output/changes_grid.snapshot.txt+1 tests/snapshots/output/changes_grid_header.snapshot.txt+1 tests/snapshots/output/changes_grid_header_numbers.snapshot.txt+23−22 tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/changes_grid_header_rule.snapshot.txt+1 tests/snapshots/output/changes_grid_numbers.snapshot.txt+23−22 tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/changes_grid_rule.snapshot.txt+1 tests/snapshots/output/changes_header.snapshot.txt+1 tests/snapshots/output/changes_header_numbers.snapshot.txt+23−22 tests/snapshots/output/changes_header_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/changes_header_rule.snapshot.txt+1 tests/snapshots/output/changes_numbers.snapshot.txt+23−22 tests/snapshots/output/changes_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/changes_rule.snapshot.txt+1 tests/snapshots/output/full.snapshot.txt+23−22 tests/snapshots/output/grid.snapshot.txt+1 tests/snapshots/output/grid_header.snapshot.txt+1 tests/snapshots/output/grid_header_numbers.snapshot.txt+23−22 tests/snapshots/output/grid_header_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/grid_header_rule.snapshot.txt+1 tests/snapshots/output/grid_numbers.snapshot.txt+23−22 tests/snapshots/output/grid_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/grid_rule.snapshot.txt+1 tests/snapshots/output/header.snapshot.txt+1 tests/snapshots/output/header_numbers.snapshot.txt+23−22 tests/snapshots/output/header_numbers_rule.snapshot.txt+23−22 tests/snapshots/output/header_rule.snapshot.txt+1 tests/snapshots/output/numbers.snapshot.txt+23−22 tests/snapshots/output/numbers_rule.snapshot.txt+23−22 tests/snapshots/output/plain.snapshot.txt+1 tests/snapshots/output/rule.snapshot.txt+1 tests/snapshots/sample.modified.rs+1
tests/snapshots/output/changes.snapshot.txt+1
@@ -1,3 +1,4 @@
1++ /// A rectangle. First line is changed to prevent a regression of #1869
12 struct Rectangle {
23 width: u32,
34 height: u32,
tests/snapshots/output/changes_grid.snapshot.txt+1
@@ -1,4 +1,5 @@
11──┬─────────────────────────────────────────────────────────────────────────────
2++ │ /// A rectangle. First line is changed to prevent a regression of #1869
23 │ struct Rectangle {
34 │ width: u32,
45 │ height: u32,
tests/snapshots/output/changes_grid_header.snapshot.txt+1
@@ -1,6 +1,7 @@
11──┬─────────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33──┼─────────────────────────────────────────────────────────────────────────────
4++ │ /// A rectangle. First line is changed to prevent a regression of #1869
45 │ struct Rectangle {
56 │ width: u32,
67 │ height: u32,
tests/snapshots/output/changes_grid_header_numbers.snapshot.txt+23−22
@@ -1,26 +1,27 @@
11───────┬────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33───────┼────────────────────────────────────────────────────────────────────────
4− 1 │ struct Rectangle {
5− 2 │ width: u32,
6− 3 │ height: u32,
7− 4 │ }
8− 5 │
9− 6 _ │ fn main() {
10− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
11− 8 │
12− 9 │ println!(
13− 10 ~ │ "The perimeter of the rectangle is {} pixels.",
14− 11 ~ │ perimeter(&rect1)
15− 12 │ );
16− 13 + │ println!(r#"This line contains invalid utf8: "�����"#;
17− 14 │ }
18− 15 │
19− 16 │ fn area(rectangle: &Rectangle) -> u32 {
20− 17 │ rectangle.width * rectangle.height
21− 18 │ }
22− 19 + │
23− 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
24− 21 + │ (rectangle.width + rectangle.height) * 2
25− 22 + │ }
4+ 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
5+ 2 │ struct Rectangle {
6+ 3 │ width: u32,
7+ 4 │ height: u32,
8+ 5 │ }
9+ 6 │
10+ 7 _ │ fn main() {
11+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
12+ 9 │
13+ 10 │ println!(
14+ 11 ~ │ "The perimeter of the rectangle is {} pixels.",
15+ 12 ~ │ perimeter(&rect1)
16+ 13 │ );
17+ 14 + │ println!(r#"This line contains invalid utf8: "�����"#;
18+ 15 │ }
19+ 16 │
20+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
21+ 18 │ rectangle.width * rectangle.height
22+ 19 │ }
23+ 20 + │
24+ 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
25+ 22 + │ (rectangle.width + rectangle.height) * 2
26+ 23 + │ }
2627───────┴────────────────────────────────────────────────────────────────────────
tests/snapshots/output/changes_grid_header_numbers_rule.snapshot.txt+23−22
@@ -1,26 +1,27 @@
11───────┬────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33───────┼────────────────────────────────────────────────────────────────────────
4− 1 │ struct Rectangle {
5− 2 │ width: u32,
6− 3 │ height: u32,
7− 4 │ }
8− 5 │
9− 6 _ │ fn main() {
10− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
11− 8 │
12− 9 │ println!(
13− 10 ~ │ "The perimeter of the rectangle is {} pixels.",
14− 11 ~ │ perimeter(&rect1)
15− 12 │ );
16− 13 + │ println!(r#"This line contains invalid utf8: "�����"#;
17− 14 │ }
18− 15 │
19− 16 │ fn area(rectangle: &Rectangle) -> u32 {
20− 17 │ rectangle.width * rectangle.height
21− 18 │ }
22− 19 + │
23− 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
24− 21 + │ (rectangle.width + rectangle.height) * 2
25− 22 + │ }
4+ 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
5+ 2 │ struct Rectangle {
6+ 3 │ width: u32,
7+ 4 │ height: u32,
8+ 5 │ }
9+ 6 │
10+ 7 _ │ fn main() {
11+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
12+ 9 │
13+ 10 │ println!(
14+ 11 ~ │ "The perimeter of the rectangle is {} pixels.",
15+ 12 ~ │ perimeter(&rect1)
16+ 13 │ );
17+ 14 + │ println!(r#"This line contains invalid utf8: "�����"#;
18+ 15 │ }
19+ 16 │
20+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
21+ 18 │ rectangle.width * rectangle.height
22+ 19 │ }
23+ 20 + │
24+ 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
25+ 22 + │ (rectangle.width + rectangle.height) * 2
26+ 23 + │ }
2627───────┴────────────────────────────────────────────────────────────────────────
tests/snapshots/output/changes_grid_header_rule.snapshot.txt+1
@@ -1,6 +1,7 @@
11──┬─────────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33──┼─────────────────────────────────────────────────────────────────────────────
4++ │ /// A rectangle. First line is changed to prevent a regression of #1869
45 │ struct Rectangle {
56 │ width: u32,
67 │ height: u32,
tests/snapshots/output/changes_grid_numbers.snapshot.txt+23−22
@@ -1,24 +1,25 @@
11───────┬────────────────────────────────────────────────────────────────────────
2− 1 │ struct Rectangle {
3− 2 │ width: u32,
4− 3 │ height: u32,
5− 4 │ }
6− 5 │
7− 6 _ │ fn main() {
8− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
9− 8 │
10− 9 │ println!(
11− 10 ~ │ "The perimeter of the rectangle is {} pixels.",
12− 11 ~ │ perimeter(&rect1)
13− 12 │ );
14− 13 + │ println!(r#"This line contains invalid utf8: "�����"#;
15− 14 │ }
16− 15 │
17− 16 │ fn area(rectangle: &Rectangle) -> u32 {
18− 17 │ rectangle.width * rectangle.height
19− 18 │ }
20− 19 + │
21− 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 + │ (rectangle.width + rectangle.height) * 2
23− 22 + │ }
2+ 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 │ struct Rectangle {
4+ 3 │ width: u32,
5+ 4 │ height: u32,
6+ 5 │ }
7+ 6 │
8+ 7 _ │ fn main() {
9+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
10+ 9 │
11+ 10 │ println!(
12+ 11 ~ │ "The perimeter of the rectangle is {} pixels.",
13+ 12 ~ │ perimeter(&rect1)
14+ 13 │ );
15+ 14 + │ println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 │ }
17+ 16 │
18+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
19+ 18 │ rectangle.width * rectangle.height
20+ 19 │ }
21+ 20 + │
22+ 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 + │ (rectangle.width + rectangle.height) * 2
24+ 23 + │ }
2425───────┴────────────────────────────────────────────────────────────────────────
tests/snapshots/output/changes_grid_numbers_rule.snapshot.txt+23−22
@@ -1,24 +1,25 @@
11───────┬────────────────────────────────────────────────────────────────────────
2− 1 │ struct Rectangle {
3− 2 │ width: u32,
4− 3 │ height: u32,
5− 4 │ }
6− 5 │
7− 6 _ │ fn main() {
8− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
9− 8 │
10− 9 │ println!(
11− 10 ~ │ "The perimeter of the rectangle is {} pixels.",
12− 11 ~ │ perimeter(&rect1)
13− 12 │ );
14− 13 + │ println!(r#"This line contains invalid utf8: "�����"#;
15− 14 │ }
16− 15 │
17− 16 │ fn area(rectangle: &Rectangle) -> u32 {
18− 17 │ rectangle.width * rectangle.height
19− 18 │ }
20− 19 + │
21− 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 + │ (rectangle.width + rectangle.height) * 2
23− 22 + │ }
2+ 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 │ struct Rectangle {
4+ 3 │ width: u32,
5+ 4 │ height: u32,
6+ 5 │ }
7+ 6 │
8+ 7 _ │ fn main() {
9+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
10+ 9 │
11+ 10 │ println!(
12+ 11 ~ │ "The perimeter of the rectangle is {} pixels.",
13+ 12 ~ │ perimeter(&rect1)
14+ 13 │ );
15+ 14 + │ println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 │ }
17+ 16 │
18+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
19+ 18 │ rectangle.width * rectangle.height
20+ 19 │ }
21+ 20 + │
22+ 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 + │ (rectangle.width + rectangle.height) * 2
24+ 23 + │ }
2425───────┴────────────────────────────────────────────────────────────────────────
tests/snapshots/output/changes_grid_rule.snapshot.txt+1
@@ -1,4 +1,5 @@
11──┬─────────────────────────────────────────────────────────────────────────────
2++ │ /// A rectangle. First line is changed to prevent a regression of #1869
23 │ struct Rectangle {
34 │ width: u32,
45 │ height: u32,
tests/snapshots/output/changes_header.snapshot.txt+1
@@ -1,4 +1,5 @@
11 File: sample.rs
2++ /// A rectangle. First line is changed to prevent a regression of #1869
23 struct Rectangle {
34 width: u32,
45 height: u32,
tests/snapshots/output/changes_header_numbers.snapshot.txt+23−22
@@ -1,23 +1,24 @@
11 File: sample.rs
2− 1 struct Rectangle {
3− 2 width: u32,
4− 3 height: u32,
5− 4 }
6− 5
7− 6 _ fn main() {
8− 7 let rect1 = Rectangle { width: 30, height: 50 };
9− 8
10− 9 println!(
11− 10 ~ "The perimeter of the rectangle is {} pixels.",
12− 11 ~ perimeter(&rect1)
13− 12 );
14− 13 + println!(r#"This line contains invalid utf8: "�����"#;
15− 14 }
16− 15
17− 16 fn area(rectangle: &Rectangle) -> u32 {
18− 17 rectangle.width * rectangle.height
19− 18 }
20− 19 +
21− 20 + fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 + (rectangle.width + rectangle.height) * 2
23− 22 + }
2+ 1 + /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 struct Rectangle {
4+ 3 width: u32,
5+ 4 height: u32,
6+ 5 }
7+ 6
8+ 7 _ fn main() {
9+ 8 let rect1 = Rectangle { width: 30, height: 50 };
10+ 9
11+ 10 println!(
12+ 11 ~ "The perimeter of the rectangle is {} pixels.",
13+ 12 ~ perimeter(&rect1)
14+ 13 );
15+ 14 + println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 }
17+ 16
18+ 17 fn area(rectangle: &Rectangle) -> u32 {
19+ 18 rectangle.width * rectangle.height
20+ 19 }
21+ 20 +
22+ 21 + fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 + (rectangle.width + rectangle.height) * 2
24+ 23 + }
tests/snapshots/output/changes_header_numbers_rule.snapshot.txt+23−22
@@ -1,23 +1,24 @@
11 File: sample.rs
2− 1 struct Rectangle {
3− 2 width: u32,
4− 3 height: u32,
5− 4 }
6− 5
7− 6 _ fn main() {
8− 7 let rect1 = Rectangle { width: 30, height: 50 };
9− 8
10− 9 println!(
11− 10 ~ "The perimeter of the rectangle is {} pixels.",
12− 11 ~ perimeter(&rect1)
13− 12 );
14− 13 + println!(r#"This line contains invalid utf8: "�����"#;
15− 14 }
16− 15
17− 16 fn area(rectangle: &Rectangle) -> u32 {
18− 17 rectangle.width * rectangle.height
19− 18 }
20− 19 +
21− 20 + fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 + (rectangle.width + rectangle.height) * 2
23− 22 + }
2+ 1 + /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 struct Rectangle {
4+ 3 width: u32,
5+ 4 height: u32,
6+ 5 }
7+ 6
8+ 7 _ fn main() {
9+ 8 let rect1 = Rectangle { width: 30, height: 50 };
10+ 9
11+ 10 println!(
12+ 11 ~ "The perimeter of the rectangle is {} pixels.",
13+ 12 ~ perimeter(&rect1)
14+ 13 );
15+ 14 + println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 }
17+ 16
18+ 17 fn area(rectangle: &Rectangle) -> u32 {
19+ 18 rectangle.width * rectangle.height
20+ 19 }
21+ 20 +
22+ 21 + fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 + (rectangle.width + rectangle.height) * 2
24+ 23 + }
tests/snapshots/output/changes_header_rule.snapshot.txt+1
@@ -1,4 +1,5 @@
11 File: sample.rs
2++ /// A rectangle. First line is changed to prevent a regression of #1869
23 struct Rectangle {
34 width: u32,
45 height: u32,
tests/snapshots/output/changes_numbers.snapshot.txt+23−22
@@ -1,22 +1,23 @@
1− 1 struct Rectangle {
2− 2 width: u32,
3− 3 height: u32,
4− 4 }
5− 5
6− 6 _ fn main() {
7− 7 let rect1 = Rectangle { width: 30, height: 50 };
8− 8
9− 9 println!(
10− 10 ~ "The perimeter of the rectangle is {} pixels.",
11− 11 ~ perimeter(&rect1)
12− 12 );
13− 13 + println!(r#"This line contains invalid utf8: "�����"#;
14− 14 }
15− 15
16− 16 fn area(rectangle: &Rectangle) -> u32 {
17− 17 rectangle.width * rectangle.height
18− 18 }
19− 19 +
20− 20 + fn perimeter(rectangle: &Rectangle) -> u32 {
21− 21 + (rectangle.width + rectangle.height) * 2
22− 22 + }
1+ 1 + /// A rectangle. First line is changed to prevent a regression of #1869
2+ 2 struct Rectangle {
3+ 3 width: u32,
4+ 4 height: u32,
5+ 5 }
6+ 6
7+ 7 _ fn main() {
8+ 8 let rect1 = Rectangle { width: 30, height: 50 };
9+ 9
10+ 10 println!(
11+ 11 ~ "The perimeter of the rectangle is {} pixels.",
12+ 12 ~ perimeter(&rect1)
13+ 13 );
14+ 14 + println!(r#"This line contains invalid utf8: "�����"#;
15+ 15 }
16+ 16
17+ 17 fn area(rectangle: &Rectangle) -> u32 {
18+ 18 rectangle.width * rectangle.height
19+ 19 }
20+ 20 +
21+ 21 + fn perimeter(rectangle: &Rectangle) -> u32 {
22+ 22 + (rectangle.width + rectangle.height) * 2
23+ 23 + }
tests/snapshots/output/changes_numbers_rule.snapshot.txt+23−22
@@ -1,22 +1,23 @@
1− 1 struct Rectangle {
2− 2 width: u32,
3− 3 height: u32,
4− 4 }
5− 5
6− 6 _ fn main() {
7− 7 let rect1 = Rectangle { width: 30, height: 50 };
8− 8
9− 9 println!(
10− 10 ~ "The perimeter of the rectangle is {} pixels.",
11− 11 ~ perimeter(&rect1)
12− 12 );
13− 13 + println!(r#"This line contains invalid utf8: "�����"#;
14− 14 }
15− 15
16− 16 fn area(rectangle: &Rectangle) -> u32 {
17− 17 rectangle.width * rectangle.height
18− 18 }
19− 19 +
20− 20 + fn perimeter(rectangle: &Rectangle) -> u32 {
21− 21 + (rectangle.width + rectangle.height) * 2
22− 22 + }
1+ 1 + /// A rectangle. First line is changed to prevent a regression of #1869
2+ 2 struct Rectangle {
3+ 3 width: u32,
4+ 4 height: u32,
5+ 5 }
6+ 6
7+ 7 _ fn main() {
8+ 8 let rect1 = Rectangle { width: 30, height: 50 };
9+ 9
10+ 10 println!(
11+ 11 ~ "The perimeter of the rectangle is {} pixels.",
12+ 12 ~ perimeter(&rect1)
13+ 13 );
14+ 14 + println!(r#"This line contains invalid utf8: "�����"#;
15+ 15 }
16+ 16
17+ 17 fn area(rectangle: &Rectangle) -> u32 {
18+ 18 rectangle.width * rectangle.height
19+ 19 }
20+ 20 +
21+ 21 + fn perimeter(rectangle: &Rectangle) -> u32 {
22+ 22 + (rectangle.width + rectangle.height) * 2
23+ 23 + }
tests/snapshots/output/changes_rule.snapshot.txt+1
@@ -1,3 +1,4 @@
1++ /// A rectangle. First line is changed to prevent a regression of #1869
12 struct Rectangle {
23 width: u32,
34 height: u32,
tests/snapshots/output/full.snapshot.txt+23−22
@@ -1,26 +1,27 @@
11───────┬────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33───────┼────────────────────────────────────────────────────────────────────────
4− 1 │ struct Rectangle {
5− 2 │ width: u32,
6− 3 │ height: u32,
7− 4 │ }
8− 5 │
9− 6 _ │ fn main() {
10− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
11− 8 │
12− 9 │ println!(
13− 10 ~ │ "The perimeter of the rectangle is {} pixels.",
14− 11 ~ │ perimeter(&rect1)
15− 12 │ );
16− 13 + │ println!(r#"This line contains invalid utf8: "�����"#;
17− 14 │ }
18− 15 │
19− 16 │ fn area(rectangle: &Rectangle) -> u32 {
20− 17 │ rectangle.width * rectangle.height
21− 18 │ }
22− 19 + │
23− 20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
24− 21 + │ (rectangle.width + rectangle.height) * 2
25− 22 + │ }
4+ 1 + │ /// A rectangle. First line is changed to prevent a regression of #1869
5+ 2 │ struct Rectangle {
6+ 3 │ width: u32,
7+ 4 │ height: u32,
8+ 5 │ }
9+ 6 │
10+ 7 _ │ fn main() {
11+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
12+ 9 │
13+ 10 │ println!(
14+ 11 ~ │ "The perimeter of the rectangle is {} pixels.",
15+ 12 ~ │ perimeter(&rect1)
16+ 13 │ );
17+ 14 + │ println!(r#"This line contains invalid utf8: "�����"#;
18+ 15 │ }
19+ 16 │
20+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
21+ 18 │ rectangle.width * rectangle.height
22+ 19 │ }
23+ 20 + │
24+ 21 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
25+ 22 + │ (rectangle.width + rectangle.height) * 2
26+ 23 + │ }
2627───────┴────────────────────────────────────────────────────────────────────────
tests/snapshots/output/grid.snapshot.txt+1
@@ -1,4 +1,5 @@
11────────────────────────────────────────────────────────────────────────────────
2+/// A rectangle. First line is changed to prevent a regression of #1869
23struct Rectangle {
34 width: u32,
45 height: u32,
tests/snapshots/output/grid_header.snapshot.txt+1
@@ -1,6 +1,7 @@
11────────────────────────────────────────────────────────────────────────────────
22File: sample.rs
33────────────────────────────────────────────────────────────────────────────────
4+/// A rectangle. First line is changed to prevent a regression of #1869
45struct Rectangle {
56 width: u32,
67 height: u32,
tests/snapshots/output/grid_header_numbers.snapshot.txt+23−22
@@ -1,26 +1,27 @@
11─────┬──────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33─────┼──────────────────────────────────────────────────────────────────────────
4− 1 │ struct Rectangle {
5− 2 │ width: u32,
6− 3 │ height: u32,
7− 4 │ }
8− 5 │
9− 6 │ fn main() {
10− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
11− 8 │
12− 9 │ println!(
13− 10 │ "The perimeter of the rectangle is {} pixels.",
14− 11 │ perimeter(&rect1)
15− 12 │ );
16− 13 │ println!(r#"This line contains invalid utf8: "�����"#;
17− 14 │ }
18− 15 │
19− 16 │ fn area(rectangle: &Rectangle) -> u32 {
20− 17 │ rectangle.width * rectangle.height
21− 18 │ }
22− 19 │
23− 20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
24− 21 │ (rectangle.width + rectangle.height) * 2
25− 22 │ }
4+ 1 │ /// A rectangle. First line is changed to prevent a regression of #1869
5+ 2 │ struct Rectangle {
6+ 3 │ width: u32,
7+ 4 │ height: u32,
8+ 5 │ }
9+ 6 │
10+ 7 │ fn main() {
11+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
12+ 9 │
13+ 10 │ println!(
14+ 11 │ "The perimeter of the rectangle is {} pixels.",
15+ 12 │ perimeter(&rect1)
16+ 13 │ );
17+ 14 │ println!(r#"This line contains invalid utf8: "�����"#;
18+ 15 │ }
19+ 16 │
20+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
21+ 18 │ rectangle.width * rectangle.height
22+ 19 │ }
23+ 20 │
24+ 21 │ fn perimeter(rectangle: &Rectangle) -> u32 {
25+ 22 │ (rectangle.width + rectangle.height) * 2
26+ 23 │ }
2627─────┴──────────────────────────────────────────────────────────────────────────
tests/snapshots/output/grid_header_numbers_rule.snapshot.txt+23−22
@@ -1,26 +1,27 @@
11─────┬──────────────────────────────────────────────────────────────────────────
22 │ File: sample.rs
33─────┼──────────────────────────────────────────────────────────────────────────
4− 1 │ struct Rectangle {
5− 2 │ width: u32,
6− 3 │ height: u32,
7− 4 │ }
8− 5 │
9− 6 │ fn main() {
10− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
11− 8 │
12− 9 │ println!(
13− 10 │ "The perimeter of the rectangle is {} pixels.",
14− 11 │ perimeter(&rect1)
15− 12 │ );
16− 13 │ println!(r#"This line contains invalid utf8: "�����"#;
17− 14 │ }
18− 15 │
19− 16 │ fn area(rectangle: &Rectangle) -> u32 {
20− 17 │ rectangle.width * rectangle.height
21− 18 │ }
22− 19 │
23− 20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
24− 21 │ (rectangle.width + rectangle.height) * 2
25− 22 │ }
4+ 1 │ /// A rectangle. First line is changed to prevent a regression of #1869
5+ 2 │ struct Rectangle {
6+ 3 │ width: u32,
7+ 4 │ height: u32,
8+ 5 │ }
9+ 6 │
10+ 7 │ fn main() {
11+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
12+ 9 │
13+ 10 │ println!(
14+ 11 │ "The perimeter of the rectangle is {} pixels.",
15+ 12 │ perimeter(&rect1)
16+ 13 │ );
17+ 14 │ println!(r#"This line contains invalid utf8: "�����"#;
18+ 15 │ }
19+ 16 │
20+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
21+ 18 │ rectangle.width * rectangle.height
22+ 19 │ }
23+ 20 │
24+ 21 │ fn perimeter(rectangle: &Rectangle) -> u32 {
25+ 22 │ (rectangle.width + rectangle.height) * 2
26+ 23 │ }
2627─────┴──────────────────────────────────────────────────────────────────────────
tests/snapshots/output/grid_header_rule.snapshot.txt+1
@@ -1,6 +1,7 @@
11────────────────────────────────────────────────────────────────────────────────
22File: sample.rs
33────────────────────────────────────────────────────────────────────────────────
4+/// A rectangle. First line is changed to prevent a regression of #1869
45struct Rectangle {
56 width: u32,
67 height: u32,
tests/snapshots/output/grid_numbers.snapshot.txt+23−22
@@ -1,24 +1,25 @@
11─────┬──────────────────────────────────────────────────────────────────────────
2− 1 │ struct Rectangle {
3− 2 │ width: u32,
4− 3 │ height: u32,
5− 4 │ }
6− 5 │
7− 6 │ fn main() {
8− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
9− 8 │
10− 9 │ println!(
11− 10 │ "The perimeter of the rectangle is {} pixels.",
12− 11 │ perimeter(&rect1)
13− 12 │ );
14− 13 │ println!(r#"This line contains invalid utf8: "�����"#;
15− 14 │ }
16− 15 │
17− 16 │ fn area(rectangle: &Rectangle) -> u32 {
18− 17 │ rectangle.width * rectangle.height
19− 18 │ }
20− 19 │
21− 20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 │ (rectangle.width + rectangle.height) * 2
23− 22 │ }
2+ 1 │ /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 │ struct Rectangle {
4+ 3 │ width: u32,
5+ 4 │ height: u32,
6+ 5 │ }
7+ 6 │
8+ 7 │ fn main() {
9+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
10+ 9 │
11+ 10 │ println!(
12+ 11 │ "The perimeter of the rectangle is {} pixels.",
13+ 12 │ perimeter(&rect1)
14+ 13 │ );
15+ 14 │ println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 │ }
17+ 16 │
18+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
19+ 18 │ rectangle.width * rectangle.height
20+ 19 │ }
21+ 20 │
22+ 21 │ fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 │ (rectangle.width + rectangle.height) * 2
24+ 23 │ }
2425─────┴──────────────────────────────────────────────────────────────────────────
tests/snapshots/output/grid_numbers_rule.snapshot.txt+23−22
@@ -1,24 +1,25 @@
11─────┬──────────────────────────────────────────────────────────────────────────
2− 1 │ struct Rectangle {
3− 2 │ width: u32,
4− 3 │ height: u32,
5− 4 │ }
6− 5 │
7− 6 │ fn main() {
8− 7 │ let rect1 = Rectangle { width: 30, height: 50 };
9− 8 │
10− 9 │ println!(
11− 10 │ "The perimeter of the rectangle is {} pixels.",
12− 11 │ perimeter(&rect1)
13− 12 │ );
14− 13 │ println!(r#"This line contains invalid utf8: "�����"#;
15− 14 │ }
16− 15 │
17− 16 │ fn area(rectangle: &Rectangle) -> u32 {
18− 17 │ rectangle.width * rectangle.height
19− 18 │ }
20− 19 │
21− 20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 │ (rectangle.width + rectangle.height) * 2
23− 22 │ }
2+ 1 │ /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 │ struct Rectangle {
4+ 3 │ width: u32,
5+ 4 │ height: u32,
6+ 5 │ }
7+ 6 │
8+ 7 │ fn main() {
9+ 8 │ let rect1 = Rectangle { width: 30, height: 50 };
10+ 9 │
11+ 10 │ println!(
12+ 11 │ "The perimeter of the rectangle is {} pixels.",
13+ 12 │ perimeter(&rect1)
14+ 13 │ );
15+ 14 │ println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 │ }
17+ 16 │
18+ 17 │ fn area(rectangle: &Rectangle) -> u32 {
19+ 18 │ rectangle.width * rectangle.height
20+ 19 │ }
21+ 20 │
22+ 21 │ fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 │ (rectangle.width + rectangle.height) * 2
24+ 23 │ }
2425─────┴──────────────────────────────────────────────────────────────────────────
tests/snapshots/output/grid_rule.snapshot.txt+1
@@ -1,4 +1,5 @@
11────────────────────────────────────────────────────────────────────────────────
2+/// A rectangle. First line is changed to prevent a regression of #1869
23struct Rectangle {
34 width: u32,
45 height: u32,
tests/snapshots/output/header.snapshot.txt+1
@@ -1,4 +1,5 @@
11File: sample.rs
2+/// A rectangle. First line is changed to prevent a regression of #1869
23struct Rectangle {
34 width: u32,
45 height: u32,
tests/snapshots/output/header_numbers.snapshot.txt+23−22
@@ -1,23 +1,24 @@
11 File: sample.rs
2− 1 struct Rectangle {
3− 2 width: u32,
4− 3 height: u32,
5− 4 }
6− 5
7− 6 fn main() {
8− 7 let rect1 = Rectangle { width: 30, height: 50 };
9− 8
10− 9 println!(
11− 10 "The perimeter of the rectangle is {} pixels.",
12− 11 perimeter(&rect1)
13− 12 );
14− 13 println!(r#"This line contains invalid utf8: "�����"#;
15− 14 }
16− 15
17− 16 fn area(rectangle: &Rectangle) -> u32 {
18− 17 rectangle.width * rectangle.height
19− 18 }
20− 19
21− 20 fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 (rectangle.width + rectangle.height) * 2
23− 22 }
2+ 1 /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 struct Rectangle {
4+ 3 width: u32,
5+ 4 height: u32,
6+ 5 }
7+ 6
8+ 7 fn main() {
9+ 8 let rect1 = Rectangle { width: 30, height: 50 };
10+ 9
11+ 10 println!(
12+ 11 "The perimeter of the rectangle is {} pixels.",
13+ 12 perimeter(&rect1)
14+ 13 );
15+ 14 println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 }
17+ 16
18+ 17 fn area(rectangle: &Rectangle) -> u32 {
19+ 18 rectangle.width * rectangle.height
20+ 19 }
21+ 20
22+ 21 fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 (rectangle.width + rectangle.height) * 2
24+ 23 }
tests/snapshots/output/header_numbers_rule.snapshot.txt+23−22
@@ -1,23 +1,24 @@
11 File: sample.rs
2− 1 struct Rectangle {
3− 2 width: u32,
4− 3 height: u32,
5− 4 }
6− 5
7− 6 fn main() {
8− 7 let rect1 = Rectangle { width: 30, height: 50 };
9− 8
10− 9 println!(
11− 10 "The perimeter of the rectangle is {} pixels.",
12− 11 perimeter(&rect1)
13− 12 );
14− 13 println!(r#"This line contains invalid utf8: "�����"#;
15− 14 }
16− 15
17− 16 fn area(rectangle: &Rectangle) -> u32 {
18− 17 rectangle.width * rectangle.height
19− 18 }
20− 19
21− 20 fn perimeter(rectangle: &Rectangle) -> u32 {
22− 21 (rectangle.width + rectangle.height) * 2
23− 22 }
2+ 1 /// A rectangle. First line is changed to prevent a regression of #1869
3+ 2 struct Rectangle {
4+ 3 width: u32,
5+ 4 height: u32,
6+ 5 }
7+ 6
8+ 7 fn main() {
9+ 8 let rect1 = Rectangle { width: 30, height: 50 };
10+ 9
11+ 10 println!(
12+ 11 "The perimeter of the rectangle is {} pixels.",
13+ 12 perimeter(&rect1)
14+ 13 );
15+ 14 println!(r#"This line contains invalid utf8: "�����"#;
16+ 15 }
17+ 16
18+ 17 fn area(rectangle: &Rectangle) -> u32 {
19+ 18 rectangle.width * rectangle.height
20+ 19 }
21+ 20
22+ 21 fn perimeter(rectangle: &Rectangle) -> u32 {
23+ 22 (rectangle.width + rectangle.height) * 2
24+ 23 }
tests/snapshots/output/header_rule.snapshot.txt+1
@@ -1,4 +1,5 @@
11File: sample.rs
2+/// A rectangle. First line is changed to prevent a regression of #1869
23struct Rectangle {
34 width: u32,
45 height: u32,
tests/snapshots/output/numbers.snapshot.txt+23−22
@@ -1,22 +1,23 @@
1− 1 struct Rectangle {
2− 2 width: u32,
3− 3 height: u32,
4− 4 }
5− 5
6− 6 fn main() {
7− 7 let rect1 = Rectangle { width: 30, height: 50 };
8− 8
9− 9 println!(
10− 10 "The perimeter of the rectangle is {} pixels.",
11− 11 perimeter(&rect1)
12− 12 );
13− 13 println!(r#"This line contains invalid utf8: "�����"#;
14− 14 }
15− 15
16− 16 fn area(rectangle: &Rectangle) -> u32 {
17− 17 rectangle.width * rectangle.height
18− 18 }
19− 19
20− 20 fn perimeter(rectangle: &Rectangle) -> u32 {
21− 21 (rectangle.width + rectangle.height) * 2
22− 22 }
1+ 1 /// A rectangle. First line is changed to prevent a regression of #1869
2+ 2 struct Rectangle {
3+ 3 width: u32,
4+ 4 height: u32,
5+ 5 }
6+ 6
7+ 7 fn main() {
8+ 8 let rect1 = Rectangle { width: 30, height: 50 };
9+ 9
10+ 10 println!(
11+ 11 "The perimeter of the rectangle is {} pixels.",
12+ 12 perimeter(&rect1)
13+ 13 );
14+ 14 println!(r#"This line contains invalid utf8: "�����"#;
15+ 15 }
16+ 16
17+ 17 fn area(rectangle: &Rectangle) -> u32 {
18+ 18 rectangle.width * rectangle.height
19+ 19 }
20+ 20
21+ 21 fn perimeter(rectangle: &Rectangle) -> u32 {
22+ 22 (rectangle.width + rectangle.height) * 2
23+ 23 }
tests/snapshots/output/numbers_rule.snapshot.txt+23−22
@@ -1,22 +1,23 @@
1− 1 struct Rectangle {
2− 2 width: u32,
3− 3 height: u32,
4− 4 }
5− 5
6− 6 fn main() {
7− 7 let rect1 = Rectangle { width: 30, height: 50 };
8− 8
9− 9 println!(
10− 10 "The perimeter of the rectangle is {} pixels.",
11− 11 perimeter(&rect1)
12− 12 );
13− 13 println!(r#"This line contains invalid utf8: "�����"#;
14− 14 }
15− 15
16− 16 fn area(rectangle: &Rectangle) -> u32 {
17− 17 rectangle.width * rectangle.height
18− 18 }
19− 19
20− 20 fn perimeter(rectangle: &Rectangle) -> u32 {
21− 21 (rectangle.width + rectangle.height) * 2
22− 22 }
1+ 1 /// A rectangle. First line is changed to prevent a regression of #1869
2+ 2 struct Rectangle {
3+ 3 width: u32,
4+ 4 height: u32,
5+ 5 }
6+ 6
7+ 7 fn main() {
8+ 8 let rect1 = Rectangle { width: 30, height: 50 };
9+ 9
10+ 10 println!(
11+ 11 "The perimeter of the rectangle is {} pixels.",
12+ 12 perimeter(&rect1)
13+ 13 );
14+ 14 println!(r#"This line contains invalid utf8: "�����"#;
15+ 15 }
16+ 16
17+ 17 fn area(rectangle: &Rectangle) -> u32 {
18+ 18 rectangle.width * rectangle.height
19+ 19 }
20+ 20
21+ 21 fn perimeter(rectangle: &Rectangle) -> u32 {
22+ 22 (rectangle.width + rectangle.height) * 2
23+ 23 }
tests/snapshots/output/plain.snapshot.txt+1
@@ -1,3 +1,4 @@
1+/// A rectangle. First line is changed to prevent a regression of #1869
12struct Rectangle {
23 width: u32,
34 height: u32,
tests/snapshots/output/rule.snapshot.txt+1
@@ -1,3 +1,4 @@
1+/// A rectangle. First line is changed to prevent a regression of #1869
12struct Rectangle {
23 width: u32,
34 height: u32,
tests/snapshots/sample.modified.rs+1
@@ -1,3 +1,4 @@
1+/// A rectangle. First line is changed to prevent a regression of #1869
12struct Rectangle {
23 width: u32,
34 height: u32,