refactor(serde): use serde derive macro
This commit is contained in:
parent
c86fef91a0
commit
bd1fc756bd
22 changed files with 203 additions and 422 deletions
|
|
@ -3,13 +3,17 @@ use memchr::memchr;
|
|||
|
||||
/// palnning elements
|
||||
#[cfg_attr(test, derive(PartialEq))]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
||||
#[derive(Debug)]
|
||||
pub struct Planning<'a> {
|
||||
/// the date when the task should be done
|
||||
#[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
|
||||
pub deadline: Option<&'a Timestamp<'a>>,
|
||||
/// the date when you should start working on the task
|
||||
#[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
|
||||
pub scheduled: Option<&'a Timestamp<'a>>,
|
||||
/// the date when the task is closed
|
||||
#[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
|
||||
pub closed: Option<&'a Timestamp<'a>>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue