From 3d28e61aa2e4ac453ec9c8b7bb53a9ee32eb2a3d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Tue, 23 Jul 2024 00:14:52 -0400 Subject: [PATCH] TaskData::uuid -> get_uuid --- taskchampion/src/replica.rs | 2 +- taskchampion/src/task/data.rs | 6 +++--- taskchampion/src/task/task.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/taskchampion/src/replica.rs b/taskchampion/src/replica.rs index c1e2b8318..ed8cb16e9 100644 --- a/taskchampion/src/replica.rs +++ b/taskchampion/src/replica.rs @@ -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()); diff --git a/taskchampion/src/task/data.rs b/taskchampion/src/task/data.rs index 394bcfc71..c4df9010d 100644 --- a/taskchampion/src/task/data.rs +++ b/taskchampion/src/task/data.rs @@ -34,7 +34,7 @@ impl TaskData { } /// Get this task's UUID. - pub fn uuid(&self) -> Uuid { + pub fn get_uuid(&self) -> Uuid { self.uuid } @@ -121,7 +121,7 @@ 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 }])); } @@ -129,7 +129,7 @@ mod test { #[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] diff --git a/taskchampion/src/task/task.rs b/taskchampion/src/task/task.rs index c88029c5d..b944c9f27 100644 --- a/taskchampion/src/task/task.rs +++ b/taskchampion/src/task/task.rs @@ -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 { @@ -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