blob: 4c0768c6a6048a9ef9ebdbd2db613bbd6e64cf12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
mod exchange;
mod Csv;
//use exchange::Stock;
use Csv::CsvFile;
fn main() {
println!("Welcome to your investment calculator!");
// TODO Compute how the money would have benn developed on historical data
//Stock::read_from_csv_file("~/hih");
let config = CsvFile::read_file("test.csv", ";", true);
let config = match config {
Ok(c) => c,
Err(error) => panic!("Error reading CSV file: {}", error),
};
let mut i = 0;
for line in config.content {
i += 1;
for f in line {
println!("{}: {}",i, f)
}
}
}
|