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