error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:7:39
+ --> $DIR/needless_collect_indirect.rs:8:39
|
LL | let indirect_iter = sample.iter().collect::<Vec<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:9:38
+ --> $DIR/needless_collect_indirect.rs:10:38
|
LL | let indirect_len = sample.iter().collect::<VecDeque<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:11:40
+ --> $DIR/needless_collect_indirect.rs:12:40
|
LL | let indirect_empty = sample.iter().collect::<VecDeque<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:13:43
+ --> $DIR/needless_collect_indirect.rs:14:43
|
LL | let indirect_contains = sample.iter().collect::<VecDeque<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:25:48
+ --> $DIR/needless_collect_indirect.rs:26:48
|
LL | let non_copy_contains = sample.into_iter().collect::<Vec<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:54:51
+ --> $DIR/needless_collect_indirect.rs:55:51
|
LL | let buffer: Vec<&str> = string.split('/').collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:59:55
+ --> $DIR/needless_collect_indirect.rs:60:55
|
LL | let indirect_len: VecDeque<_> = sample.iter().collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:64:57
+ --> $DIR/needless_collect_indirect.rs:65:57
|
LL | let indirect_len: LinkedList<_> = sample.iter().collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:69:57
+ --> $DIR/needless_collect_indirect.rs:70:57
|
LL | let indirect_len: BinaryHeap<_> = sample.iter().collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:129:59
+ --> $DIR/needless_collect_indirect.rs:130:59
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:154:59
+ --> $DIR/needless_collect_indirect.rs:155:59
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:183:63
+ --> $DIR/needless_collect_indirect.rs:184:63
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:219:59
+ --> $DIR/needless_collect_indirect.rs:220:59
|
LL | let y: Vec<usize> = vec.iter().map(|k| k * k).collect();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:244:26
+ --> $DIR/needless_collect_indirect.rs:245:26
|
LL | let w = v.iter().collect::<Vec<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:266:30
+ --> $DIR/needless_collect_indirect.rs:267:30
|
LL | let mut w = v.iter().collect::<Vec<_>>();
| ^^^^^^^
|
error: avoid using `collect()` when not needed
- --> $DIR/needless_collect_indirect.rs:288:30
+ --> $DIR/needless_collect_indirect.rs:289:30
|
LL | let mut w = v.iter().collect::<Vec<_>>();
| ^^^^^^^