diff options
author | metamuffin <metamuffin@disroot.org> | 2022-08-19 22:07:47 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-08-19 22:07:47 +0200 |
commit | ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8 (patch) | |
tree | fbe83966e9ad8cef4270a4438b7021be9c079fcd /karlcommon/src/misc.rs | |
parent | fd5294bf2775330a48e8f049395b17498b9264b3 (diff) | |
download | karlender-ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8.tar karlender-ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8.tar.bz2 karlender-ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8.tar.zst |
more task editing ui
Diffstat (limited to 'karlcommon/src/misc.rs')
-rw-r--r-- | karlcommon/src/misc.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/karlcommon/src/misc.rs b/karlcommon/src/misc.rs index 583ed27..4d181ba 100644 --- a/karlcommon/src/misc.rs +++ b/karlcommon/src/misc.rs @@ -1,4 +1,4 @@ -use crate::Property; +use crate::{Property, Task}; impl Property { pub const VALUES: &'static [Property] = &[ @@ -28,3 +28,15 @@ impl Property { } } } + +impl Task { + pub fn default_with_id(id: u64) -> Self { + Self { + id, + name: Default::default(), + description: Default::default(), + tags: Default::default(), + schedule: crate::Schedule::Never, + } + } +} |