Rdzewieć linie odczytu ze stdina i zwróć VEC
//read lines from stdin and return a vector
fn readlines() -> Vec<String> {
use std::io::prelude::*;
let stdin = std::io::stdin();
let v = stdin.lock().lines().map(|x| x.unwrap()).collect();
v
}
// sample usage
fn main() {
let f = readlines();
println!("{:?}", f);
}
Mackerel