|
1 | | -error: using `to_owned` on an already owned type |
2 | | - --> $DIR/owned_to_owned.rs:33:20 |
| 1 | +error: `to_owned` called on a `Vec` |
| 2 | + --> $DIR/owned_to_owned.rs:59:17 |
3 | 3 | | |
4 | | -LL | let _ = result.to_owned(); |
5 | | - | ^^^^^^^^ help: replace this with: `clone` |
| 4 | +LL | let _ = vec.to_owned(); |
| 5 | + | ^^^^^^^^ help: consider using: `clone` |
6 | 6 | | |
7 | 7 | = note: `-D clippy::owned-to-owned` implied by `-D warnings` |
8 | 8 |
|
9 | | -error: using `to_vec` on an already owned type |
10 | | - --> $DIR/owned_to_owned.rs:34:20 |
| 9 | +error: `to_vec` called on a `Vec` |
| 10 | + --> $DIR/owned_to_owned.rs:60:17 |
11 | 11 | | |
12 | | -LL | let _ = result.to_vec(); |
13 | | - | ^^^^^^ help: replace this with: `clone` |
| 12 | +LL | let _ = vec.to_vec(); |
| 13 | + | ^^^^^^ help: consider using: `clone` |
14 | 14 |
|
15 | | -error: using `to_owned` on an already owned type |
16 | | - --> $DIR/owned_to_owned.rs:37:17 |
| 15 | +error: `to_owned` called on a `String` |
| 16 | + --> $DIR/owned_to_owned.rs:78:17 |
17 | 17 | | |
18 | 18 | LL | let _ = str.to_owned(); |
19 | | - | ^^^^^^^^ help: replace this with: `clone` |
| 19 | + | ^^^^^^^^ help: consider using: `clone` |
20 | 20 |
|
21 | | -error: using `to_owned` on an already owned type |
22 | | - --> $DIR/owned_to_owned.rs:40:13 |
| 21 | +error: `to_owned` called on a `Kitten` |
| 22 | + --> $DIR/owned_to_owned.rs:82:20 |
23 | 23 | | |
24 | 24 | LL | let _ = kitten.to_owned(); |
25 | | - | ^^^^^^^^^^^^^^^^^ help: replace this with: `kitten` |
| 25 | + | ^^^^^^^^ help: consider using: `clone` |
26 | 26 |
|
27 | | -error: using `to_owned` on an already owned type |
28 | | - --> $DIR/owned_to_owned.rs:47:21 |
| 27 | +error: `to_owned` called on a `PathBuf` |
| 28 | + --> $DIR/owned_to_owned.rs:90:21 |
29 | 29 | | |
30 | 30 | LL | let _ = pathbuf.to_owned(); |
31 | | - | ^^^^^^^^ help: replace this with: `clone` |
| 31 | + | ^^^^^^^^ help: consider using: `clone` |
32 | 32 |
|
33 | | -error: using `to_path_buf` on an already owned type |
34 | | - --> $DIR/owned_to_owned.rs:48:21 |
| 33 | +error: `to_path_buf` called on a `PathBuf` |
| 34 | + --> $DIR/owned_to_owned.rs:91:21 |
35 | 35 | | |
36 | 36 | LL | let _ = pathbuf.to_path_buf(); |
37 | | - | ^^^^^^^^^^^ help: replace this with: `clone` |
| 37 | + | ^^^^^^^^^^^ help: consider using: `clone` |
38 | 38 |
|
39 | | -error: aborting due to 6 previous errors |
| 39 | +error: `to_owned` called on a `OsString` |
| 40 | + --> $DIR/owned_to_owned.rs:94:23 |
| 41 | + | |
| 42 | +LL | let _ = os_string.to_owned(); |
| 43 | + | ^^^^^^^^ help: consider using: `clone` |
| 44 | + |
| 45 | +error: `to_os_string` called on a `OsString` |
| 46 | + --> $DIR/owned_to_owned.rs:95:23 |
| 47 | + | |
| 48 | +LL | let _ = os_string.to_os_string(); |
| 49 | + | ^^^^^^^^^^^^ help: consider using: `clone` |
| 50 | + |
| 51 | +error: aborting due to 8 previous errors |
40 | 52 |
|
0 commit comments