Impl Default for DiaryId
This commit is contained in:
parent
b04b6e3d24
commit
7c50dd88b5
1 changed files with 10 additions and 0 deletions
|
@ -94,6 +94,16 @@ impl DiaryId {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for DiaryId {
|
||||||
|
|
||||||
|
/// Create a default DiaryId which is a diaryid for a diary named "default" with
|
||||||
|
/// time = 0000-00-00 00:00:00
|
||||||
|
fn default() -> DiaryId {
|
||||||
|
let dt = NaiveDateTime::new(NaiveDate::from_ymd(0, 0, 0), NaiveTime::from_hms(0, 0, 0));
|
||||||
|
DiaryId::from_datetime(String::from("default"), dt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl IntoStoreId for DiaryId {
|
impl IntoStoreId for DiaryId {
|
||||||
|
|
||||||
fn into_storeid(self) -> StoreId {
|
fn into_storeid(self) -> StoreId {
|
||||||
|
|
Loading…
Reference in a new issue