mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
123 lines
3.4 KiB
Text
123 lines
3.4 KiB
Text
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:16:41
|
|
|
|
|
LL | let _ = ["lorem", "ipsum"].join(" ").to_string();
|
|
| ^^^^^^^^^^^^ help: remove this
|
|
|
|
|
= note: `-D clippy::redundant-clone` implied by `-D warnings`
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:16:13
|
|
|
|
|
LL | let _ = ["lorem", "ipsum"].join(" ").to_string();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:19:14
|
|
|
|
|
LL | let _ = s.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:19:13
|
|
|
|
|
LL | let _ = s.clone();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:22:14
|
|
|
|
|
LL | let _ = s.to_string();
|
|
| ^^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:22:13
|
|
|
|
|
LL | let _ = s.to_string();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:25:14
|
|
|
|
|
LL | let _ = s.to_owned();
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:25:13
|
|
|
|
|
LL | let _ = s.to_owned();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:27:41
|
|
|
|
|
LL | let _ = Path::new("/a/b/").join("c").to_owned();
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:27:13
|
|
|
|
|
LL | let _ = Path::new("/a/b/").join("c").to_owned();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:29:41
|
|
|
|
|
LL | let _ = Path::new("/a/b/").join("c").to_path_buf();
|
|
| ^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:29:13
|
|
|
|
|
LL | let _ = Path::new("/a/b/").join("c").to_path_buf();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:31:28
|
|
|
|
|
LL | let _ = OsString::new().to_owned();
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:31:13
|
|
|
|
|
LL | let _ = OsString::new().to_owned();
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:33:28
|
|
|
|
|
LL | let _ = OsString::new().to_os_string();
|
|
| ^^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:33:13
|
|
|
|
|
LL | let _ = OsString::new().to_os_string();
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:40:18
|
|
|
|
|
LL | let _ = tup.0.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:40:13
|
|
|
|
|
LL | let _ = tup.0.clone();
|
|
| ^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:50:22
|
|
|
|
|
LL | (a.clone(), a.clone())
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:50:21
|
|
|
|
|
LL | (a.clone(), a.clone())
|
|
| ^
|
|
|
|
error: aborting due to 10 previous errors
|
|
|