Skip to content

Commit 17d174d

Browse files
committed
Reformat redundant_as_str ui test
1 parent 5224853 commit 17d174d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/ui/redundant_as_str.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
#![warn(clippy::redundant_as_str)]
22

33
fn main() {
4-
let string = "Hello, world!".to_owned();
4+
let string = "Hello, world!".to_owned();
55

6-
// These methods are redundant and the `as_str` can be removed
6+
// These methods are redundant and the `as_str` can be removed
77
let _redundant = string.as_str().as_bytes();
88
let _redundant = string.as_str().is_empty();
99

1010
// These methods don't use `as_str` when they are redundant
1111
let _no_as_str = string.as_bytes();
1212
let _no_as_str = string.is_empty();
1313

14-
// These methods are not redundant, and are equivelant to
15-
// doing dereferencing the string and applying the method
14+
// These methods are not redundant, and are equivelant to
15+
// doing dereferencing the string and applying the method
1616
let _not_redundant = string.as_str().escape_unicode();
1717
let _not_redundant = string.as_str().trim();
1818
let _not_redundant = string.as_str().split_whitespace();
1919

20-
// These methods don't use `as_str` and are applied on a `str` directly
21-
let borrowed_str = "Hello, world!";
20+
// These methods don't use `as_str` and are applied on a `str` directly
21+
let borrowed_str = "Hello, world!";
2222
let _is_str = borrowed_str.as_bytes();
2323
let _is_str = borrowed_str.is_empty();
2424
}

0 commit comments

Comments
 (0)