mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 12:05:52 +00:00
Add line with invalid UTF-8
This commit is contained in:
parent
c826c2a438
commit
d0782ef954
@ -13,13 +13,14 @@
|
||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
||||
11 ~ │ perimeter(&rect1)
|
||||
12 │ );
|
||||
13 │ }
|
||||
14 │
|
||||
15 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 │ rectangle.width * rectangle.height
|
||||
17 │ }
|
||||
18 + │
|
||||
19 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 + │ (rectangle.width + rectangle.height) * 2
|
||||
21 + │ }
|
||||
13 + │ <bat: INVALID UTF-8>
|
||||
14 │ }
|
||||
15 │
|
||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 │ rectangle.width * rectangle.height
|
||||
18 │ }
|
||||
19 + │
|
||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 + │ (rectangle.width + rectangle.height) * 2
|
||||
22 + │ }
|
||||
───────┴────────────────────────────────────────────────────────────────────────
|
||||
|
@ -13,6 +13,7 @@ _ │ fn main() {
|
||||
~ │ "The perimeter of the rectangle is {} pixels.",
|
||||
~ │ perimeter(&rect1)
|
||||
│ );
|
||||
+ │ <bat: INVALID UTF-8>
|
||||
│ }
|
||||
│
|
||||
│ fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -10,13 +10,14 @@
|
||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
||||
11 ~ │ perimeter(&rect1)
|
||||
12 │ );
|
||||
13 │ }
|
||||
14 │
|
||||
15 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 │ rectangle.width * rectangle.height
|
||||
17 │ }
|
||||
18 + │
|
||||
19 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 + │ (rectangle.width + rectangle.height) * 2
|
||||
21 + │ }
|
||||
13 + │ <bat: INVALID UTF-8>
|
||||
14 │ }
|
||||
15 │
|
||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 │ rectangle.width * rectangle.height
|
||||
18 │ }
|
||||
19 + │
|
||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 + │ (rectangle.width + rectangle.height) * 2
|
||||
22 + │ }
|
||||
───────┴────────────────────────────────────────────────────────────────────────
|
||||
|
@ -10,6 +10,7 @@ _ │ fn main() {
|
||||
~ │ "The perimeter of the rectangle is {} pixels.",
|
||||
~ │ perimeter(&rect1)
|
||||
│ );
|
||||
+ │ <bat: INVALID UTF-8>
|
||||
│ }
|
||||
│
|
||||
│ fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -11,12 +11,13 @@ File: sample.rs
|
||||
10 ~ "The perimeter of the rectangle is {} pixels.",
|
||||
11 ~ perimeter(&rect1)
|
||||
12 );
|
||||
13 }
|
||||
14
|
||||
15 fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 rectangle.width * rectangle.height
|
||||
17 }
|
||||
18 +
|
||||
19 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 + (rectangle.width + rectangle.height) * 2
|
||||
21 + }
|
||||
13 + <bat: INVALID UTF-8>
|
||||
14 }
|
||||
15
|
||||
16 fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 rectangle.width * rectangle.height
|
||||
18 }
|
||||
19 +
|
||||
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 + (rectangle.width + rectangle.height) * 2
|
||||
22 + }
|
||||
|
@ -11,6 +11,7 @@ _ fn main() {
|
||||
~ "The perimeter of the rectangle is {} pixels.",
|
||||
~ perimeter(&rect1)
|
||||
);
|
||||
+ <bat: INVALID UTF-8>
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -10,12 +10,13 @@
|
||||
10 ~ "The perimeter of the rectangle is {} pixels.",
|
||||
11 ~ perimeter(&rect1)
|
||||
12 );
|
||||
13 }
|
||||
14
|
||||
15 fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 rectangle.width * rectangle.height
|
||||
17 }
|
||||
18 +
|
||||
19 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 + (rectangle.width + rectangle.height) * 2
|
||||
21 + }
|
||||
13 + <bat: INVALID UTF-8>
|
||||
14 }
|
||||
15
|
||||
16 fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 rectangle.width * rectangle.height
|
||||
18 }
|
||||
19 +
|
||||
20 + fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 + (rectangle.width + rectangle.height) * 2
|
||||
22 + }
|
||||
|
@ -10,6 +10,7 @@ _ fn main() {
|
||||
~ "The perimeter of the rectangle is {} pixels.",
|
||||
~ perimeter(&rect1)
|
||||
);
|
||||
+ <bat: INVALID UTF-8>
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -13,13 +13,14 @@
|
||||
10 ~ │ "The perimeter of the rectangle is {} pixels.",
|
||||
11 ~ │ perimeter(&rect1)
|
||||
12 │ );
|
||||
13 │ }
|
||||
14 │
|
||||
15 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 │ rectangle.width * rectangle.height
|
||||
17 │ }
|
||||
18 + │
|
||||
19 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 + │ (rectangle.width + rectangle.height) * 2
|
||||
21 + │ }
|
||||
13 + │ <bat: INVALID UTF-8>
|
||||
14 │ }
|
||||
15 │
|
||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 │ rectangle.width * rectangle.height
|
||||
18 │ }
|
||||
19 + │
|
||||
20 + │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 + │ (rectangle.width + rectangle.height) * 2
|
||||
22 + │ }
|
||||
───────┴────────────────────────────────────────────────────────────────────────
|
||||
|
@ -13,13 +13,14 @@
|
||||
10 │ "The perimeter of the rectangle is {} pixels.",
|
||||
11 │ perimeter(&rect1)
|
||||
12 │ );
|
||||
13 │ }
|
||||
14 │
|
||||
15 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 │ rectangle.width * rectangle.height
|
||||
17 │ }
|
||||
18 │
|
||||
19 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 │ (rectangle.width + rectangle.height) * 2
|
||||
21 │ }
|
||||
13 │ <bat: INVALID UTF-8>
|
||||
14 │ }
|
||||
15 │
|
||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 │ rectangle.width * rectangle.height
|
||||
18 │ }
|
||||
19 │
|
||||
20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 │ (rectangle.width + rectangle.height) * 2
|
||||
22 │ }
|
||||
─────┴──────────────────────────────────────────────────────────────────────────
|
||||
|
@ -13,6 +13,7 @@ fn main() {
|
||||
"The perimeter of the rectangle is {} pixels.",
|
||||
perimeter(&rect1)
|
||||
);
|
||||
<bat: INVALID UTF-8>
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -10,13 +10,14 @@
|
||||
10 │ "The perimeter of the rectangle is {} pixels.",
|
||||
11 │ perimeter(&rect1)
|
||||
12 │ );
|
||||
13 │ }
|
||||
14 │
|
||||
15 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 │ rectangle.width * rectangle.height
|
||||
17 │ }
|
||||
18 │
|
||||
19 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 │ (rectangle.width + rectangle.height) * 2
|
||||
21 │ }
|
||||
13 │ <bat: INVALID UTF-8>
|
||||
14 │ }
|
||||
15 │
|
||||
16 │ fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 │ rectangle.width * rectangle.height
|
||||
18 │ }
|
||||
19 │
|
||||
20 │ fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 │ (rectangle.width + rectangle.height) * 2
|
||||
22 │ }
|
||||
─────┴──────────────────────────────────────────────────────────────────────────
|
||||
|
@ -10,6 +10,7 @@ fn main() {
|
||||
"The perimeter of the rectangle is {} pixels.",
|
||||
perimeter(&rect1)
|
||||
);
|
||||
<bat: INVALID UTF-8>
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -11,12 +11,13 @@ File: sample.rs
|
||||
10 "The perimeter of the rectangle is {} pixels.",
|
||||
11 perimeter(&rect1)
|
||||
12 );
|
||||
13 }
|
||||
14
|
||||
15 fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 rectangle.width * rectangle.height
|
||||
17 }
|
||||
18
|
||||
19 fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 (rectangle.width + rectangle.height) * 2
|
||||
21 }
|
||||
13 <bat: INVALID UTF-8>
|
||||
14 }
|
||||
15
|
||||
16 fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 rectangle.width * rectangle.height
|
||||
18 }
|
||||
19
|
||||
20 fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 (rectangle.width + rectangle.height) * 2
|
||||
22 }
|
||||
|
@ -11,6 +11,7 @@ fn main() {
|
||||
"The perimeter of the rectangle is {} pixels.",
|
||||
perimeter(&rect1)
|
||||
);
|
||||
<bat: INVALID UTF-8>
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -10,12 +10,13 @@
|
||||
10 "The perimeter of the rectangle is {} pixels.",
|
||||
11 perimeter(&rect1)
|
||||
12 );
|
||||
13 }
|
||||
14
|
||||
15 fn area(rectangle: &Rectangle) -> u32 {
|
||||
16 rectangle.width * rectangle.height
|
||||
17 }
|
||||
18
|
||||
19 fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
20 (rectangle.width + rectangle.height) * 2
|
||||
21 }
|
||||
13 <bat: INVALID UTF-8>
|
||||
14 }
|
||||
15
|
||||
16 fn area(rectangle: &Rectangle) -> u32 {
|
||||
17 rectangle.width * rectangle.height
|
||||
18 }
|
||||
19
|
||||
20 fn perimeter(rectangle: &Rectangle) -> u32 {
|
||||
21 (rectangle.width + rectangle.height) * 2
|
||||
22 }
|
||||
|
@ -10,6 +10,7 @@ fn main() {
|
||||
"The perimeter of the rectangle is {} pixels.",
|
||||
perimeter(&rect1)
|
||||
);
|
||||
<bat: INVALID UTF-8>
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
@ -10,6 +10,7 @@ fn main() {
|
||||
"The perimeter of the rectangle is {} pixels.",
|
||||
perimeter(&rect1)
|
||||
);
|
||||
println!(r#"This line contains invalid utf8: "øˆ€€€"#;
|
||||
}
|
||||
|
||||
fn area(rectangle: &Rectangle) -> u32 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user