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:
parent
334e9e3954
commit
86dca4887d
1 changed files with 4 additions and 2 deletions
|
@ -365,7 +365,7 @@ fn today(rt: &Runtime, future: bool) {
|
||||||
relevant
|
relevant
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|habit| show_done || {
|
.filter(|habit| show_done || {
|
||||||
habit
|
let instance_exists = habit
|
||||||
.next_instance_date()
|
.next_instance_date()
|
||||||
.map_err_trace_exit_unwrap()
|
.map_err_trace_exit_unwrap()
|
||||||
.map(|date| {
|
.map(|date| {
|
||||||
|
@ -380,7 +380,9 @@ fn today(rt: &Runtime, future: bool) {
|
||||||
|
|
||||||
instance_exists
|
instance_exists
|
||||||
})
|
})
|
||||||
.unwrap_or(false)
|
.unwrap_or(false);
|
||||||
|
|
||||||
|
!instance_exists
|
||||||
})
|
})
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.for_each(|(i, e)| {
|
.for_each(|(i, e)| {
|
||||||
|
|
Loading…
Reference in a new issue