forked from janek/mostr
1
0
Fork 0

style: reformat and remove leftover debug print

This commit is contained in:
xeruf 2024-08-10 18:12:31 +03:00
parent ae2172c8f2
commit b74ac18e39
2 changed files with 4 additions and 5 deletions

View File

@ -134,7 +134,6 @@ impl Task {
tags.into_iter()
.filter(predicate)
.map(|t| format!("{}", t.content().unwrap()))
.collect::<Vec<String>>()
.join(" ")
})
}

View File

@ -68,7 +68,7 @@ impl StateFilter {
StateFilter::Default => {
let state = task.pure_state();
state.is_open() || (state == State::Done && task.parent_id() != None)
},
}
StateFilter::All => true,
StateFilter::State(filter) => task.state().is_some_and(|t| t.matches_label(filter)),
}
@ -585,11 +585,11 @@ impl Tasks {
}
}
/// Creates a task following the current state
/// Sanitizes input
pub(crate) fn make_task(&mut self, input: &str) -> EventId {
let tag: Option<Tag> = self.get_current_task()
.and_then(|t| {
println!("{:?}", t);
if t.pure_state() == State::Procedure {
t.children.iter()
.filter_map(|id| self.get_by_id(id))