Fix potential panic resulting from no results chosen to print in print menu.

This commit is contained in:
scoobybejesus 2023-10-22 12:24:55 -04:00
parent 0b66511e2c
commit d9a296a34e
3 changed files with 7 additions and 2 deletions

2
Cargo.lock generated
View File

@ -263,7 +263,7 @@ dependencies = [
[[package]]
name = "cryptools"
version = "0.12.3"
version = "0.12.4"
dependencies = [
"chrono",
"crptls",

View File

@ -1,6 +1,6 @@
[package]
name = "cryptools"
version = "0.12.3"
version = "0.12.4"
authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"]
edition = "2021"
description = "Command-line utility for processing cryptocurrency transactions into 'lots' and 'movements'."

View File

@ -137,6 +137,11 @@ pub fn export(
println!("Attempting to export:");
if app.to_print_by_idx.is_empty() {
println!(" None selected.");
return Ok(())
}
for report_idx in app.to_print_by_idx.iter() {
println!(" {}", reports[*report_idx]);