]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` |
2 | --> $DIR/map_clone.rs:12:5 | |
3 | | | |
4 | 12 | x.iter().map(|y| y.clone()); | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `-D map-clone` implied by `-D warnings` | |
8 | = help: try | |
9 | x.iter().cloned() | |
10 | ||
11 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` | |
12 | --> $DIR/map_clone.rs:14:5 | |
13 | | | |
14 | 14 | x.iter().map(|&y| y); | |
15 | | ^^^^^^^^^^^^^^^^^^^^ | |
16 | | | |
17 | = help: try | |
18 | x.iter().cloned() | |
19 | ||
20 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` | |
21 | --> $DIR/map_clone.rs:16:5 | |
22 | | | |
23 | 16 | x.iter().map(|y| *y); | |
24 | | ^^^^^^^^^^^^^^^^^^^^ | |
25 | | | |
26 | = help: try | |
27 | x.iter().cloned() | |
28 | ||
29 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` | |
30 | --> $DIR/map_clone.rs:18:5 | |
31 | | | |
32 | 18 | x.iter().map(|y| { y.clone() }); | |
33 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
34 | | | |
35 | = help: try | |
36 | x.iter().cloned() | |
37 | ||
38 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` | |
39 | --> $DIR/map_clone.rs:20:5 | |
40 | | | |
41 | 20 | x.iter().map(|&y| { y }); | |
42 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
43 | | | |
44 | = help: try | |
45 | x.iter().cloned() | |
46 | ||
47 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` | |
48 | --> $DIR/map_clone.rs:22:5 | |
49 | | | |
50 | 22 | x.iter().map(|y| { *y }); | |
51 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
52 | | | |
53 | = help: try | |
54 | x.iter().cloned() | |
55 | ||
56 | error: you seem to be using .map() to clone the contents of an iterator, consider using `.cloned()` | |
57 | --> $DIR/map_clone.rs:24:5 | |
58 | | | |
59 | 24 | x.iter().map(Clone::clone); | |
60 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
61 | | | |
62 | = help: try | |
63 | x.iter().cloned() | |
64 | ||
65 | error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()` | |
66 | --> $DIR/map_clone.rs:30:5 | |
67 | | | |
68 | 30 | x.as_ref().map(|y| y.clone()); | |
69 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
70 | | | |
71 | = help: try | |
72 | x.as_ref().cloned() | |
73 | ||
74 | error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()` | |
75 | --> $DIR/map_clone.rs:32:5 | |
76 | | | |
77 | 32 | x.as_ref().map(|&y| y); | |
78 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
79 | | | |
80 | = help: try | |
81 | x.as_ref().cloned() | |
82 | ||
83 | error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()` | |
84 | --> $DIR/map_clone.rs:34:5 | |
85 | | | |
86 | 34 | x.as_ref().map(|y| *y); | |
87 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
88 | | | |
89 | = help: try | |
90 | x.as_ref().cloned() | |
91 | ||
92 | error: you seem to be using .map() to clone the contents of an Option, consider using `.cloned()` | |
93 | --> $DIR/map_clone.rs:90:35 | |
94 | | | |
95 | 90 | let _: Option<UnusualDeref> = x.as_ref().map(|y| *y); | |
96 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
97 | | | |
98 | = help: try | |
99 | x.as_ref().cloned() | |
100 |