mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Rename replica.gc to replica.rebuild_working_set
The command-line operation is still `gc`, but we'll break that down into finer pieces in the replica.
This commit is contained in:
parent
da63d77d9d
commit
b62370c150
4 changed files with 9 additions and 8 deletions
|
@ -172,7 +172,7 @@ impl Replica {
|
|||
|
||||
/// Perform "garbage collection" on this replica. In particular, this renumbers the working
|
||||
/// set to contain only pending tasks.
|
||||
pub fn gc(&mut self) -> Fallible<()> {
|
||||
pub fn rebuild_working_set(&mut self) -> Fallible<()> {
|
||||
let pending = String::from(Status::Pending.to_taskmap());
|
||||
self.taskdb
|
||||
.rebuild_working_set(|t| t.get("status") == Some(&pending))?;
|
||||
|
@ -251,7 +251,7 @@ mod tests {
|
|||
assert_eq!(t.get_status(), Status::Deleted);
|
||||
assert_eq!(t.get_description(), "gone");
|
||||
|
||||
rep.gc().unwrap();
|
||||
rep.rebuild_working_set().unwrap();
|
||||
|
||||
assert!(rep.get_working_set_index(t.get_uuid()).unwrap().is_none());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue