diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-10-16 19:13:16 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-10-16 19:13:16 +0200 |
commit | 7331909e7767509b27877d99adff1de44b41f8fb (patch) | |
tree | f80778d8bbe539d9670a4cb98426ebf69b03bec1 /src/lib.rs | |
parent | 0f326725722743a4a003f1125c82f12787272bf8 (diff) | |
download | frotate.rs-7331909e7767509b27877d99adff1de44b41f8fb.tar.gz |
Reverse date partitions later
Make partition_days() more like partition().
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -87,8 +87,8 @@ mod tests { d(2019, 09, 01), d(2019, 09, 02), d(2019, 09, 03), d(2019, 09, 04)]; let outs = list![list![d(2019, 09, 04)], - list![d(2019, 09, 02), d(2019, 09, 03)], - list![d(2019, 08, 30), d(2019, 08, 31), d(2019, 09, 01)]]; + list![d(2019, 09, 03), d(2019, 09, 02)], + list![d(2019, 09, 01), d(2019, 08, 31), d(2019, 08, 30)]]; assert_eq!(partition_days(&exp2, &ins), outs); } @@ -138,7 +138,6 @@ pub fn partition_days( .map(|l| { l.into_iter() .map(|d| day1 - Duration::days(d)) - .rev() .collect() }) .collect(); |