LL | let bm = BTreeMap::from_iter(values.iter().cloned());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `values.iter().cloned().collect::<std::collections::BTreeMap<i32, char>>()`
error: usage of `FromIterator::from_iter`
--> $DIR/from_iter_instead_of_collect.rs:25:19
|
LL | let mut bar = BTreeMap::from_iter(bm.range(0..2));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `bm.range(0..2).collect::<std::collections::BTreeMap<&i32, &char>>()`
error: usage of `FromIterator::from_iter`
--> $DIR/from_iter_instead_of_collect.rs:28:19
|
LL | let mut bts = BTreeSet::from_iter(0..3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<std::collections::BTreeSet<i32>>()`
error: usage of `FromIterator::from_iter`
--> $DIR/from_iter_instead_of_collect.rs:32:17
|
LL | let _ = collections::BTreeSet::from_iter(0..3);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `(0..3).collect::<std::collections::BTreeSet<i32>>()`