2021-12-17 12:40:22 +00:00
|
|
|
error: redundant clone
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:151:64
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_c_str(&CString::from_vec_with_nul(vec![0]).unwrap().to_owned());
|
|
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-clone` implied by `-D warnings`
|
|
|
|
note: this value is dropped without further use
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:151:20
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_c_str(&CString::from_vec_with_nul(vec![0]).unwrap().to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: redundant clone
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:152:40
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_os_str(&OsString::from("x").to_os_string());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:152:21
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_os_str(&OsString::from("x").to_os_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: redundant clone
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:153:48
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_path(&std::path::PathBuf::from("x").to_path_buf());
|
|
|
|
| ^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:153:19
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_path(&std::path::PathBuf::from("x").to_path_buf());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: redundant clone
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:154:35
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_str(&String::from("x").to_string());
|
|
|
|
| ^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:154:18
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_str(&String::from("x").to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-05-21 11:24:00 +00:00
|
|
|
error: redundant clone
|
|
|
|
--> $DIR/unnecessary_to_owned.rs:155:39
|
|
|
|
|
|
|
|
|
LL | require_slice(&[String::from("x")].to_owned());
|
|
|
|
| ^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
|
|
|
--> $DIR/unnecessary_to_owned.rs:155:20
|
|
|
|
|
|
|
|
|
LL | require_slice(&[String::from("x")].to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-12-17 12:40:22 +00:00
|
|
|
error: unnecessary use of `into_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:60:36
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_c_str(&Cow::from(c_str).into_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:61:19
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_c_str(&c_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `c_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_os_string`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:63:20
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_os_str(&os_str.to_os_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: use: `os_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `into_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:64:38
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_os_str(&Cow::from(os_str).into_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:65:20
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_os_str(&os_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: use: `os_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_path_buf`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:67:18
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_path(&path.to_path_buf());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: use: `path`
|
|
|
|
|
|
|
|
error: unnecessary use of `into_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:68:34
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_path(&Cow::from(path).into_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:69:18
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_path(&path.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `path`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_string`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:71:17
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_str(&s.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `into_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:72:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_str(&Cow::from(s).into_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:73:17
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_str(&s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_string`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:74:17
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_str(&x_ref.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: use: `x_ref.as_ref()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:76:19
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_slice(&slice.to_vec());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `into_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:77:36
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_slice(&Cow::from(slice).into_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:78:19
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_slice(&array.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `array.as_ref()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:79:19
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_slice(&array_ref.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: use: `array_ref.as_ref()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:80:19
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_slice(&slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `into_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:83:42
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_x(&Cow::<X>::Owned(x.clone()).into_owned());
|
|
|
|
| ^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:86:25
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_c_str(c_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `c_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:87:26
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_os_str(os_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `os_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:88:24
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_path(path.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: use: `path`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:89:23
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_str(s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:90:25
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_slice(slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:92:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_deref_c_str(c_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `c_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:93:31
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_deref_os_str(os_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `os_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:94:29
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_deref_path(path.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: use: `path`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:95:28
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_deref_str(s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:96:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_deref_slice(slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:98:29
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_str_slice(s.to_owned(), slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:98:43
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_str_slice(s.to_owned(), slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:99:29
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_slice_str(slice.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:99:47
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_deref_slice_str(slice.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:101:26
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_c_str(c_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `c_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:102:27
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_os_str(os_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `os_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:103:25
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_path(path.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: use: `path`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:104:24
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str(s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:105:24
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str(x.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `&x`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:106:26
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice(array.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `array`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:107:26
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice(array_ref.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: use: `array_ref`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:108:26
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice(slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:110:31
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_c_str(c_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `c_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:111:32
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_os_str(os_str.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `os_str`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:112:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_path(path.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^ help: use: `path`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:113:29
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_str(s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:114:29
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_str(x.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `&x`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:115:31
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_slice(array.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `array`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:116:31
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_slice(array_ref.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: use: `array_ref`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:117:31
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_impl_as_ref_slice(slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:119:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str_slice(s.to_owned(), array.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:119:44
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str_slice(s.to_owned(), array.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `array`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:120:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str_slice(s.to_owned(), array_ref.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:120:44
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str_slice(s.to_owned(), array_ref.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: use: `array_ref`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:121:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str_slice(s.to_owned(), slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:121:44
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_str_slice(s.to_owned(), slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:122:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice_str(array.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `array`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:122:48
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice_str(array.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:123:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice_str(array_ref.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: use: `array_ref`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:123:52
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice_str(array_ref.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:124:30
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice_str(slice.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: use: `slice`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:124:48
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | require_as_ref_slice_str(slice.to_owned(), s.to_owned());
|
|
|
|
| ^^^^^^^^^^^^ help: use: `s`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_string`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:126:20
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.join(&x_ref.to_string());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: use: `x_ref`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:128:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = slice.to_vec().into_iter();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:129:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = slice.to_owned().into_iter();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:130:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [std::path::PathBuf::new()][..].to_vec().into_iter();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:131:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [std::path::PathBuf::new()][..].to_owned().into_iter();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:133:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = IntoIterator::into_iter(slice.to_vec());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:134:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = IntoIterator::into_iter(slice.to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `slice.iter().copied()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:135:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = IntoIterator::into_iter([std::path::PathBuf::new()][..].to_vec());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_owned`
|
2022-05-05 14:12:52 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:136:13
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | let _ = IntoIterator::into_iter([std::path::PathBuf::new()][..].to_owned());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `[std::path::PathBuf::new()][..].iter().cloned()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-21 11:24:00 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:198:14
|
2021-12-17 12:40:22 +00:00
|
|
|
|
|
|
|
|
LL | for t in file_types.to_vec() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use
|
|
|
|
|
|
|
|
|
LL | for t in file_types {
|
|
|
|
| ~~~~~~~~~~
|
|
|
|
help: remove this `&`
|
|
|
|
|
|
|
|
|
LL - let path = match get_file_path(&t) {
|
|
|
|
LL + let path = match get_file_path(t) {
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-12-17 12:40:22 +00:00
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-21 11:24:00 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:221:14
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let _ = &["x"][..].to_vec().into_iter();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `["x"][..].iter().cloned()`
|
|
|
|
|
|
|
|
error: unnecessary use of `to_vec`
|
2022-05-21 11:24:00 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:226:14
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let _ = &["x"][..].to_vec().into_iter();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `["x"][..].iter().copied()`
|
|
|
|
|
2022-03-24 13:50:04 +00:00
|
|
|
error: unnecessary use of `to_string`
|
2022-05-21 11:24:00 +00:00
|
|
|
--> $DIR/unnecessary_to_owned.rs:273:24
|
2022-03-24 13:50:04 +00:00
|
|
|
|
|
|
|
|
LL | Box::new(build(y.to_string()))
|
|
|
|
| ^^^^^^^^^^^^^ help: use: `y`
|
|
|
|
|
2022-09-09 11:36:26 +00:00
|
|
|
error: unnecessary use of `to_string`
|
|
|
|
--> $DIR/unnecessary_to_owned.rs:381:12
|
|
|
|
|
|
|
|
|
LL | id("abc".to_string())
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: use: `"abc"`
|
|
|
|
|
|
|
|
error: aborting due to 79 previous errors
|
2021-12-17 12:40:22 +00:00
|
|
|
|