diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-01 00:43:31 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-05 01:25:48 +0500 |
| commit | 62ada473281d86e9a7e19d2fe375171874f83cab (patch) | |
| tree | 6ccf6ea307ad104848352ff83a9d46c7f6c712d6 /tests/ui/str | |
| parent | 9ad98f78d4485f6f7f9615c1961bb75b281bfceb (diff) | |
| download | rust-62ada473281d86e9a7e19d2fe375171874f83cab.tar.gz rust-62ada473281d86e9a7e19d2fe375171874f83cab.zip | |
cleaned up some tests
Diffstat (limited to 'tests/ui/str')
| -rw-r--r-- | tests/ui/str/nul-char-equivalence.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/ui/str/nul-char-equivalence.rs b/tests/ui/str/nul-char-equivalence.rs index eb83f440d3e..2d4110de681 100644 --- a/tests/ui/str/nul-char-equivalence.rs +++ b/tests/ui/str/nul-char-equivalence.rs @@ -1,7 +1,8 @@ +//! Checks that different NUL character representations are equivalent in strings and chars. + //@ run-pass -pub fn main() -{ +pub fn main() { let all_nuls1 = "\0\x00\u{0}\u{0}"; let all_nuls2 = "\u{0}\u{0}\x00\0"; let all_nuls3 = "\u{0}\u{0}\x00\0"; @@ -17,11 +18,9 @@ pub fn main() assert_eq!(all_nuls3, all_nuls4); // all extracted characters in all_nuls are equivalent to each other - for c1 in all_nuls1.chars() - { - for c2 in all_nuls1.chars() - { - assert_eq!(c1,c2); + for c1 in all_nuls1.chars() { + for c2 in all_nuls1.chars() { + assert_eq!(c1, c2); } } |
