From 7c6ab4f9be74389366c81610e8266402fee9b45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sat, 31 Jul 2021 22:35:37 +0200 Subject: update todo --- cli/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/main.rs b/cli/src/main.rs index 43f13b3..12325e2 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -71,7 +71,7 @@ impl std::str::FromStr for ListTarget { #[derive(StructOpt)] enum SortTarget { Amount, - Date, //TODO ? + Date, } impl std::str::FromStr for SortTarget { @@ -146,6 +146,9 @@ fn main() { SortTarget::Date => transactions.sort_by_key(|t| t.date), } for i in 1..sort.len() { + //TODO This won't work with 3+ sorts in case key 2 are equal across a key 1 + // border. We need to pass the earlier buckets for later sorts as well. + // `Vec`? inner_sort_by(&mut transactions, sort_by_func(&sort[i-1]), sort_by_func(&sort[i])); } } -- cgit v1.2.1