Skip to content

Commit

Permalink
TaskData::uuid -> get_uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Jul 23, 2024
1 parent 2f54023 commit 3d28e61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion taskchampion/src/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ mod tests {
let uuid = t.get_uuid();

let t = rep.get_task_data(uuid).unwrap().unwrap();
assert_eq!(t.uuid(), uuid);
assert_eq!(t.get_uuid(), uuid);
assert_eq!(t.get("description"), Some("another task"));

assert!(rep.get_task_data(Uuid::new_v4()).unwrap().is_none());
Expand Down
6 changes: 3 additions & 3 deletions taskchampion/src/task/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl TaskData {
}

/// Get this task's UUID.
pub fn uuid(&self) -> Uuid {
pub fn get_uuid(&self) -> Uuid {
self.uuid
}

Expand Down Expand Up @@ -121,15 +121,15 @@ mod test {
let mut ops = Operations::new();
let t = TaskData::create(TEST_UUID, &mut ops);
assert_eq!(t.uuid, TEST_UUID);
assert_eq!(t.uuid(), TEST_UUID);
assert_eq!(t.get_uuid(), TEST_UUID);
assert_eq!(t.taskmap, TaskMap::new());
assert_eq!(ops, make_ops(&[Operation::Create { uuid: TEST_UUID }]));
}

#[test]
fn uuid() {
let t = TaskData::new(TEST_UUID, TaskMap::new());
assert_eq!(t.uuid(), TEST_UUID);
assert_eq!(t.get_uuid(), TEST_UUID);
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions taskchampion/src/task/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Task {
}

pub fn get_uuid(&self) -> Uuid {
self.data.uuid()
self.data.get_uuid()
}

pub fn get_taskmap(&self) -> &TaskMap {
Expand Down Expand Up @@ -163,12 +163,12 @@ impl Task {

/// Determine whether this task is blocked -- that is, has at least one unresolved dependency.
pub fn is_blocked(&self) -> bool {
self.depmap.dependencies(self.data.uuid()).next().is_some()
self.depmap.dependencies(self.get_uuid()).next().is_some()
}

/// Determine whether this task is blocking -- that is, has at least one unresolved dependent.
pub fn is_blocking(&self) -> bool {
self.depmap.dependents(self.data.uuid()).next().is_some()
self.depmap.dependents(self.get_uuid()).next().is_some()
}

/// Determine whether a given synthetic tag is present on this task. All other
Expand Down

0 comments on commit 3d28e61

Please sign in to comment.