Skip to content

Commit bbdaf3e

Browse files
committed
nul-characters
1 parent 91255f7 commit bbdaf3e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/ui/str/nul-char-equivalence.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
//! Different NUL character representations are equivalent in strings and chars.
2+
13
//@ run-pass
24

3-
pub fn main()
4-
{
5+
pub fn main() {
56
let all_nuls1 = "\0\x00\u{0}\u{0}";
67
let all_nuls2 = "\u{0}\u{0}\x00\0";
78
let all_nuls3 = "\u{0}\u{0}\x00\0";
@@ -17,11 +18,9 @@ pub fn main()
1718
assert_eq!(all_nuls3, all_nuls4);
1819

1920
// all extracted characters in all_nuls are equivalent to each other
20-
for c1 in all_nuls1.chars()
21-
{
22-
for c2 in all_nuls1.chars()
23-
{
24-
assert_eq!(c1,c2);
21+
for c1 in all_nuls1.chars() {
22+
for c2 in all_nuls1.chars() {
23+
assert_eq!(c1, c2);
2524
}
2625
}
2726

0 commit comments

Comments
 (0)