1 use std::error::Error; 2 use std::io; 3 use std::process; 4 run() -> Result<(), Box<dyn Error>>5fn run() -> Result<(), Box<dyn Error>> { 6 let mut rdr = 7 csv::ReaderBuilder::new().has_headers(false).from_reader(io::stdin()); 8 for result in rdr.records() { 9 let record = result?; 10 println!("{:?}", record); 11 } 12 Ok(()) 13 } 14 main()15fn main() { 16 if let Err(err) = run() { 17 println!("{}", err); 18 process::exit(1); 19 } 20 } 21