2020-09-10 13:18:23 -05:00
|
|
|
#![warn(clippy::from_iter_instead_of_collect)]
|
|
|
|
|
|
|
|
use std::collections::HashMap;
|
|
|
|
use std::iter::FromIterator;
|
|
|
|
|
|
|
|
fn main() {
|
2020-10-01 11:04:05 -05:00
|
|
|
let iter_expr = std::iter::repeat(5).take(5);
|
|
|
|
Vec::from_iter(iter_expr);
|
2020-10-01 11:34:36 -05:00
|
|
|
|
2020-10-01 11:04:05 -05:00
|
|
|
HashMap::<usize, &i8>::from_iter(vec![5, 5, 5, 5].iter().enumerate());
|
2020-10-12 10:27:50 -05:00
|
|
|
|
|
|
|
Vec::from_iter(vec![42u32]);
|
2020-09-10 13:18:23 -05:00
|
|
|
}
|