Skip to content

Commit 5224853

Browse files
committed
Remove periods from end of sentences in redundant_as_str comments
1 parent 367ba9c commit 5224853

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/ui/redundant_as_str.fixed

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
fn main() {
44
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_bytes();
88
let _redundant = string.is_empty();
99

10-
// These methods don't use `as_str` when they are redundant.
10+
// 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

1414
// These methods are not redundant, and are equivelant to
15-
// doing dereferencing the string and applying the method.
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.
20+
// These methods don't use `as_str` and are applied on a `str` directly
2121
let borrowed_str = "Hello, world!";
2222
let _is_str = borrowed_str.as_bytes();
2323
let _is_str = borrowed_str.is_empty();

tests/ui/redundant_as_str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
fn main() {
44
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

10-
// These methods don't use `as_str` when they are redundant.
10+
// 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

1414
// These methods are not redundant, and are equivelant to
15-
// doing dereferencing the string and applying the method.
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.
20+
// These methods don't use `as_str` and are applied on a `str` directly
2121
let borrowed_str = "Hello, world!";
2222
let _is_str = borrowed_str.as_bytes();
2323
let _is_str = borrowed_str.is_empty();

0 commit comments

Comments
 (0)