Skip to content

Commit f2ab16e

Browse files
committed
Add not triggering examples to redundant_as_str test
1 parent 01056c5 commit f2ab16e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/ui/redundant_as_str.fixed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
fn main() {
44
let _redundant = "Hello, world!".to_owned().as_bytes();
55
let _redundant = "Hello, world!".to_owned().is_empty();
6+
7+
let _ok = "Hello, world!".to_owned().as_bytes();
8+
let _ok = "Hello, world!".to_owned().is_empty();
69
}

tests/ui/redundant_as_str.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
fn main() {
44
let _redundant = "Hello, world!".to_owned().as_str().as_bytes();
55
let _redundant = "Hello, world!".to_owned().as_str().is_empty();
6+
7+
let _ok = "Hello, world!".to_owned().as_bytes();
8+
let _ok = "Hello, world!".to_owned().is_empty();
69
}

0 commit comments

Comments
 (0)