From 059e2b2a909022ce33b0e0fb93cb80b915337fd1 Mon Sep 17 00:00:00 2001 From: scoobybejesus Date: Tue, 13 Oct 2020 00:25:40 -0400 Subject: [PATCH] Updated panic/expect message --- src/crptls_lib/csv_import_accts_txns.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/crptls_lib/csv_import_accts_txns.rs b/src/crptls_lib/csv_import_accts_txns.rs index 165095a..aeb744d 100644 --- a/src/crptls_lib/csv_import_accts_txns.rs +++ b/src/crptls_lib/csv_import_accts_txns.rs @@ -26,7 +26,7 @@ pub(crate) fn import_from_csv( transactions_map: &mut HashMap, ) -> Result<(), Box> { - let file = File::open(import_file_path)?; println!("CSV ledger file opened successfully.\n"); + let file = File::open(import_file_path)?; println!("\nCSV ledger file opened successfully.\n"); let mut rdr = csv::ReaderBuilder::new() .has_headers(true) @@ -240,7 +240,8 @@ fn import_transactions( let tx_date = NaiveDate::parse_from_str(this_tx_date, &format_yy) .unwrap_or_else(|_| NaiveDate::parse_from_str(this_tx_date, &format_yyyy) .expect(" -Failed to parse date in input file. Check date separator character (which is a hyphen unless modified via Cli option -d).\n") +Failed to parse date in input file. Check date the separator character, which is expected to be a hyphen \ + unless otherwise set via environment variable or .env file. See `.env.example.`\n") ); let transaction = Transaction {