My source code:
extern crate csv;
fn main() {
let mut rdr = csv::Reader::from_file("./data/simple.csv").unwrap();
for record in rdr.decode() {
let row: String = record.unwrap()[0];
println!("{}", row);
}
}
My error:
cargo run
Compiling moex_analytic_rust v0.0.1 (file:///home/dmitry/web/moex_analytic_rust)
src/main.rs:11:31: 11:49 error: the type of this value must be known in this context
src/main.rs:11 let row: String = record.unwrap()[0];
^~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `moex_analytic_rust`.
To learn more, run the command again with --verbose.