diff options
| author | Dev381 <49997896+Dev380@users.noreply.github.com> | 2023-09-18 16:46:00 -0400 |
|---|---|---|
| committer | Dev381 <49997896+Dev380@users.noreply.github.com> | 2023-09-18 16:46:00 -0400 |
| commit | d9d25e98fca4085cfe062700f6ca465abc20a52d (patch) | |
| tree | c50d31784270bb2af8791755bb847bbbe5a5e040 | |
| parent | 17d174d113fda8a21680a103d062d6fd589b4dc7 (diff) | |
| download | rust-d9d25e98fca4085cfe062700f6ca465abc20a52d.tar.gz rust-d9d25e98fca4085cfe062700f6ca465abc20a52d.zip | |
Fix redundant_as_str .fixed file not being consistent
| -rw-r--r-- | tests/ui/redundant_as_str.fixed | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/redundant_as_str.fixed b/tests/ui/redundant_as_str.fixed index c4962e7e000..a38523a7c79 100644 --- a/tests/ui/redundant_as_str.fixed +++ b/tests/ui/redundant_as_str.fixed @@ -1,9 +1,9 @@ #![warn(clippy::redundant_as_str)] fn main() { - let string = "Hello, world!".to_owned(); + let string = "Hello, world!".to_owned(); - // These methods are redundant and the `as_str` can be removed + // These methods are redundant and the `as_str` can be removed let _redundant = string.as_bytes(); let _redundant = string.is_empty(); @@ -11,14 +11,14 @@ fn main() { let _no_as_str = string.as_bytes(); let _no_as_str = string.is_empty(); - // These methods are not redundant, and are equivelant to - // doing dereferencing the string and applying the method + // These methods are not redundant, and are equivelant to + // doing dereferencing the string and applying the method let _not_redundant = string.as_str().escape_unicode(); let _not_redundant = string.as_str().trim(); let _not_redundant = string.as_str().split_whitespace(); - // These methods don't use `as_str` and are applied on a `str` directly - let borrowed_str = "Hello, world!"; + // These methods don't use `as_str` and are applied on a `str` directly + let borrowed_str = "Hello, world!"; let _is_str = borrowed_str.as_bytes(); let _is_str = borrowed_str.is_empty(); } |
