2023-09-18 20:36:10 +00:00
|
|
|
error: this `as_str` is redundant and can be removed as the method immediately following exists on `String` too
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/redundant_as_str.rs:7:29
|
2023-09-17 21:50:45 +00:00
|
|
|
|
|
2023-09-18 20:36:10 +00:00
|
|
|
LL | let _redundant = string.as_str().as_bytes();
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `as_bytes`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-as-str` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_as_str)]`
|
|
|
|
|
|
|
|
error: this `as_str` is redundant and can be removed as the method immediately following exists on `String` too
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/redundant_as_str.rs:8:29
|
2023-09-18 20:36:10 +00:00
|
|
|
|
|
|
|
|
LL | let _redundant = string.as_str().is_empty();
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `is_empty`
|
2023-09-17 21:50:45 +00:00
|
|
|
|
2023-09-18 20:36:10 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2023-09-17 21:50:45 +00:00
|
|
|
|