feat: ability to complete a task #35
@ -69,3 +69,9 @@ impl NewTask {
|
|||||||
Self { title, deadline, category, project_id }
|
Self { title, deadline, category, project_id }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<Task> for NewTask {
|
||||||
|
fn from(task: Task) -> Self {
|
||||||
|
Self::new(task.title, task.deadline, task.category, task.project_id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
|
Loading…
x
Reference in New Issue
Block a user
Approved: Implementation of
From<Task> for NewTask
.The new implementation for converting a
Task
instance to aNewTask
is well-implemented and promotes code reuse and simplicity. Consider adding unit tests to cover this new functionality to ensure it behaves as expected.Would you like me to help with writing the unit tests for this conversion?