Use filter fn from lib
This commit is contained in:
parent
85e76d6ff0
commit
ecb9bcc861
2 changed files with 4 additions and 5 deletions
|
@ -26,13 +26,12 @@ use itertools::Itertools;
|
|||
use itertools::MinMaxResult;
|
||||
use chrono::NaiveDateTime;
|
||||
|
||||
use common::has_end_time;
|
||||
|
||||
use libimagerror::trace::trace_error;
|
||||
use libimagerror::trace::MapErrTrace;
|
||||
use libimagerror::iter::TraceIterator;
|
||||
use libimagentrytimetrack::timetrackingstore::TimeTrackStore;
|
||||
use libimagentrytimetrack::timetracking::TimeTracking;
|
||||
use libimagentrytimetrack::iter::filter::*;
|
||||
|
||||
use libimagrt::runtime::Runtime;
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ use std::str::FromStr;
|
|||
|
||||
use filters::filter::Filter;
|
||||
|
||||
use common::*;
|
||||
|
||||
use libimagerror::trace::trace_error;
|
||||
use libimagerror::iter::TraceIterator;
|
||||
use libimagrt::runtime::Runtime;
|
||||
|
@ -32,6 +30,8 @@ use libimagentrytimetrack::timetracking::TimeTracking;
|
|||
use libimagentrytimetrack::tag::TimeTrackingTag;
|
||||
use libimagentrytimetrack::timetrackingstore::*;
|
||||
use libimagentrytimetrack::iter::get::GetTimeTrackIter;
|
||||
use libimagentrytimetrack::iter::filter::has_end_time;
|
||||
use libimagentrytimetrack::iter::filter::has_one_of_tags;
|
||||
|
||||
pub fn stop(rt: &Runtime) -> i32 {
|
||||
let (_, cmd) = rt.cli().subcommand();
|
||||
|
@ -65,7 +65,7 @@ pub fn stop(rt: &Runtime) -> i32 {
|
|||
|
||||
};
|
||||
|
||||
let filter = has_end_time.not().and(HasTagFromList::new(&tags));
|
||||
let filter = has_end_time.not().and(has_one_of_tags(&tags));
|
||||
|
||||
// Filter all timetrackings for the ones that are not yet ended.
|
||||
iter.trace_unwrap()
|
||||
|
|
Loading…
Reference in a new issue