forked from janek/mostr
style: reformat and remove leftover debug print
This commit is contained in:
parent
ae2172c8f2
commit
b74ac18e39
|
@ -134,7 +134,6 @@ impl Task {
|
||||||
tags.into_iter()
|
tags.into_iter()
|
||||||
.filter(predicate)
|
.filter(predicate)
|
||||||
.map(|t| format!("{}", t.content().unwrap()))
|
.map(|t| format!("{}", t.content().unwrap()))
|
||||||
.collect::<Vec<String>>()
|
|
||||||
.join(" ")
|
.join(" ")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ impl StateFilter {
|
||||||
StateFilter::Default => {
|
StateFilter::Default => {
|
||||||
let state = task.pure_state();
|
let state = task.pure_state();
|
||||||
state.is_open() || (state == State::Done && task.parent_id() != None)
|
state.is_open() || (state == State::Done && task.parent_id() != None)
|
||||||
},
|
}
|
||||||
StateFilter::All => true,
|
StateFilter::All => true,
|
||||||
StateFilter::State(filter) => task.state().is_some_and(|t| t.matches_label(filter)),
|
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
|
/// Sanitizes input
|
||||||
pub(crate) fn make_task(&mut self, input: &str) -> EventId {
|
pub(crate) fn make_task(&mut self, input: &str) -> EventId {
|
||||||
let tag: Option<Tag> = self.get_current_task()
|
let tag: Option<Tag> = self.get_current_task()
|
||||||
.and_then(|t| {
|
.and_then(|t| {
|
||||||
println!("{:?}", t);
|
|
||||||
if t.pure_state() == State::Procedure {
|
if t.pure_state() == State::Procedure {
|
||||||
t.children.iter()
|
t.children.iter()
|
||||||
.filter_map(|id| self.get_by_id(id))
|
.filter_map(|id| self.get_by_id(id))
|
||||||
|
|
Loading…
Reference in New Issue