A file-based task manager

FIX: duplicate backrefs added on edit

+8 -5
+2
.tsk/archive/tsk-25.tsk
···
··· 1 + fix duplicate backrefs on edit 2 +
+1 -1
.tsk/next
··· 1 - 25
··· 1 + 26
+1
.tsk/tasks/tsk-25.tsk
···
··· 1 + ../archive/tsk-25.tsk
+1 -1
Cargo.lock
··· 591 592 [[package]] 593 name = "tsk" 594 - version = "0.2.2" 595 dependencies = [ 596 "clap", 597 "clap_complete",
··· 591 592 [[package]] 593 name = "tsk" 594 + version = "0.2.3" 595 dependencies = [ 596 "clap", 597 "clap_complete",
+1 -1
Cargo.toml
··· 1 [package] 2 name = "tsk" 3 - version = "0.2.2" 4 edition = "2021" 5 publish = true 6
··· 1 [package] 2 name = "tsk" 3 + version = "0.2.3" 4 edition = "2021" 5 publish = true 6
+2 -2
src/workspace.rs
··· 204 let to_task = self.task(TaskIdentifier::Id(to))?; 205 let (_, current_backlinks_text) = 206 Self::read_xattr(&to_task.file, BACKREFXATTR.into()).unwrap_or_default(); 207 - let mut backlinks: Vec<Id> = current_backlinks_text 208 .split(',') 209 .filter_map(|s| Id::from_str(s).ok()) 210 .collect(); 211 - backlinks.push(from); 212 Self::set_xattr( 213 &to_task.file, 214 BACKREFXATTR.into(),
··· 204 let to_task = self.task(TaskIdentifier::Id(to))?; 205 let (_, current_backlinks_text) = 206 Self::read_xattr(&to_task.file, BACKREFXATTR.into()).unwrap_or_default(); 207 + let mut backlinks: HashSet<Id> = current_backlinks_text 208 .split(',') 209 .filter_map(|s| Id::from_str(s).ok()) 210 .collect(); 211 + backlinks.insert(from); 212 Self::set_xattr( 213 &to_task.file, 214 BACKREFXATTR.into(),