feat: implement From<Task> for NewTask

This commit is contained in:
Matouš Volf 2024-09-07 14:49:38 +02:00
parent 9986e5eda4
commit 3da2698af2

View File

@ -69,3 +69,9 @@ impl NewTask {
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)
}
}