diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..4c0768c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,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) + } + } +} |
