Fix potential panic resulting from no results chosen to print in print menu.
This commit is contained in:
parent
0b66511e2c
commit
d9a296a34e
|
@ -263,7 +263,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cryptools"
|
name = "cryptools"
|
||||||
version = "0.12.3"
|
version = "0.12.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crptls",
|
"crptls",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cryptools"
|
name = "cryptools"
|
||||||
version = "0.12.3"
|
version = "0.12.4"
|
||||||
authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"]
|
authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Command-line utility for processing cryptocurrency transactions into 'lots' and 'movements'."
|
description = "Command-line utility for processing cryptocurrency transactions into 'lots' and 'movements'."
|
||||||
|
|
|
@ -137,6 +137,11 @@ pub fn export(
|
||||||
|
|
||||||
println!("Attempting to 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() {
|
for report_idx in app.to_print_by_idx.iter() {
|
||||||
|
|
||||||
println!(" {}", reports[*report_idx]);
|
println!(" {}", reports[*report_idx]);
|
||||||
|
|
Loading…
Reference in New Issue