feat: ability to complete a task #35

Merged
matous-volf merged 6 commits from feat/task-complete into main 2024-09-07 12:58:36 +00:00
Showing only changes of commit 594d6c675b - Show all commits

View File

@ -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)
}
}
coderabbitai[bot] commented 2024-09-07 12:55:28 +00:00 (Migrated from github.com)
Review

Approved: Implementation of From<Task> for NewTask.

The new implementation for converting a Task instance to a NewTask 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?

**Approved: Implementation of `From<Task> for NewTask`.** The new implementation for converting a `Task` instance to a `NewTask` 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? <!-- This is an auto-generated comment by CodeRabbit -->