Skip to content

Commit

Permalink
fixed a bug of purge cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
jfding committed Oct 13, 2024
1 parent 584da69 commit f110577
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/taskbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,12 @@ impl TaskBox {
let mut newtasks = Vec::new();

// 1st scan: remove dups
let mut tname;
for (task, done) in self.tasks.iter() {
if ! hs.contains(task) {
newtasks.push((task.clone(), *done));
hs.insert(task);
tname = task.trim().to_string();
if ! hs.contains(&tname) {
newtasks.push((tname.clone(), *done));
hs.insert(tname);
}
}
// 2nd scan: check status
Expand Down

0 comments on commit f110577

Please sign in to comment.