How to append values into existed Vec with iterator
I have got an answer with chain
fn main() {
    let mut scan = Scanner::default();
    let n: usize = scan.next();
    let mut arr = vec![0];
    let mut arr: Vec&lt;i32&gt; = arr.into_iter().chain((0..n).map(|i| scan.next())).collect();
    println!(&quot;{:?}&quot;, arr);
}