less usable key

master
Bel LaPointe 2024-05-22 14:33:28 -04:00
parent 50e9c80473
commit c7b0fc8dba
2 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ impl Task {
}
pub fn is_done(&self) -> bool {
self.0.len() == 1 && self.get_value("done".to_string()).is_some()
self.get_value("_done".to_string()).is_some()
}
pub fn is_due(&self) -> bool {
@ -192,11 +192,11 @@ mod test_task {
#[test]
fn is_done() {
let mut t = Task::new();
t.set("done".to_string(), "anything".to_string());
t.set("_done".to_string(), "anything".to_string());
eprintln!("{:?}", t.0);
assert!(t.is_done());
t.set_value("done".to_string(), serde_yaml::Value::Null);
t.set_value("_done".to_string(), serde_yaml::Value::Null);
eprintln!("{:?}", t.0);
assert!(t.is_done());
}

View File

@ -5,6 +5,6 @@
- 3do: repeating scheduled
schedule: 0 0 1 1 *
ts: 2001-02-03T04:05:06Z
- done:
- _done:
do: done
schedule: 2006-04-05