mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
159 lines
4.3 KiB
Text
159 lines
4.3 KiB
Text
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:8:42
|
|
|
|
|
LL | let _s = ["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:8:14
|
|
|
|
|
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:11:15
|
|
|
|
|
LL | let _s = s.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:11:14
|
|
|
|
|
LL | let _s = s.clone();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:14:15
|
|
|
|
|
LL | let _s = s.to_string();
|
|
| ^^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:14:14
|
|
|
|
|
LL | let _s = s.to_string();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:17:15
|
|
|
|
|
LL | let _s = s.to_owned();
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:17:14
|
|
|
|
|
LL | let _s = s.to_owned();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:19:42
|
|
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_owned();
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:19:14
|
|
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_owned();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:21:42
|
|
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
|
|
| ^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:21:14
|
|
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:23:29
|
|
|
|
|
LL | let _s = OsString::new().to_owned();
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:23:14
|
|
|
|
|
LL | let _s = OsString::new().to_owned();
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:25:29
|
|
|
|
|
LL | let _s = OsString::new().to_os_string();
|
|
| ^^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:25:14
|
|
|
|
|
LL | let _s = OsString::new().to_os_string();
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:32:19
|
|
|
|
|
LL | let _t = tup.0.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:32:14
|
|
|
|
|
LL | let _t = tup.0.clone();
|
|
| ^^^^^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:58:22
|
|
|
|
|
LL | (a.clone(), a.clone())
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:58:21
|
|
|
|
|
LL | (a.clone(), a.clone())
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:114:15
|
|
|
|
|
LL | let _s = s.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:114:14
|
|
|
|
|
LL | let _s = s.clone();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:115:15
|
|
|
|
|
LL | let _t = t.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:115:14
|
|
|
|
|
LL | let _t = t.clone();
|
|
| ^
|
|
|
|
error: redundant clone
|
|
--> $DIR/redundant_clone.rs:125:19
|
|
|
|
|
LL | let _f = f.clone();
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
note: this value is dropped without further use
|
|
--> $DIR/redundant_clone.rs:125:18
|
|
|
|
|
LL | let _f = f.clone();
|
|
| ^
|
|
|
|
error: aborting due to 13 previous errors
|
|
|