Fix negation error

We Iterator::filter here, so we have to negate - because we list
everything where _no_ instance exists yet.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-02-10 22:46:59 +01:00
parent 334e9e3954
commit 86dca4887d
1 changed files with 4 additions and 2 deletions

View File

@ -365,7 +365,7 @@ fn today(rt: &Runtime, future: bool) {
relevant
.into_iter()
.filter(|habit| show_done || {
habit
let instance_exists = habit
.next_instance_date()
.map_err_trace_exit_unwrap()
.map(|date| {
@ -380,7 +380,9 @@ fn today(rt: &Runtime, future: bool) {
instance_exists
})
.unwrap_or(false)
.unwrap_or(false);
!instance_exists
})
.enumerate()
.for_each(|(i, e)| {