aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-10-16 19:13:16 +0200
committerIgor Pashev <pashev.igor@gmail.com>2019-10-16 19:13:16 +0200
commit7331909e7767509b27877d99adff1de44b41f8fb (patch)
treef80778d8bbe539d9670a4cb98426ebf69b03bec1 /src/lib.rs
parent0f326725722743a4a003f1125c82f12787272bf8 (diff)
downloadfrotate.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.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8108634..10b4ab9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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();