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()
|
||||
.filter(predicate)
|
||||
.map(|t| format!("{}", t.content().unwrap()))
|
||||
.collect::<Vec<String>>()
|
||||
.join(" ")
|
||||
})
|
||||
}
|
||||
|
@ -160,7 +159,7 @@ impl Task {
|
|||
"hashtags" => self.filter_tags(|tag| { is_hashtag(tag) }),
|
||||
"tags" => self.filter_tags(|_| true),
|
||||
"alltags" => Some(format!("{:?}", self.tags)),
|
||||
"refs" => Some(format!("{:?}", self.refs.iter().map(|re| format!("{}: {}", re.0, re.1)).collect_vec())),
|
||||
"refs" => Some(format!("{:?}", self.refs.iter().map(|re| format!("{}: {}", re.0, re.1)).collect_vec())),
|
||||
"props" => Some(format!(
|
||||
"{:?}",
|
||||
self.props
|
||||
|
|
|
@ -68,12 +68,12 @@ 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)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn as_option(&self) -> Option<String> {
|
||||
if let StateFilter::State(str) = self {
|
||||
Some(str.to_string())
|
||||
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue