aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 752204c..781018f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,6 +7,7 @@ use std::process::exit;
use chrono::NaiveDate;
use docopt::Docopt;
use serde::Deserialize;
+use std::collections::LinkedList;
mod lib;
use lib::partition_days;
@@ -40,7 +41,11 @@ fn main() {
.and_then(|d| d.deserialize())
.unwrap_or_else(|e| e.exit());
- let parts = partition_days(&|n| exponent(args.flag_base, n), &args.arg_day);
+ let parts: LinkedList<LinkedList<NaiveDate>> =
+ partition_days(&|n| exponent(args.flag_base, n), &args.arg_day)
+ .into_iter()
+ .map(|l| l.into_iter().rev().collect())
+ .collect();
if args.flag_keep {
for days in parts.iter() {