aboutsummaryrefslogtreecommitdiff
path: root/karlcommon
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-08-19 22:07:47 +0200
committermetamuffin <metamuffin@disroot.org>2022-08-19 22:07:47 +0200
commitac66248bb20d45a66cc0c3b3805498e9d6ba9bb8 (patch)
treefbe83966e9ad8cef4270a4438b7021be9c079fcd /karlcommon
parentfd5294bf2775330a48e8f049395b17498b9264b3 (diff)
downloadkarlender-ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8.tar
karlender-ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8.tar.bz2
karlender-ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8.tar.zst
more task editing ui
Diffstat (limited to 'karlcommon')
-rw-r--r--karlcommon/src/misc.rs14
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,
+ }
+ }
+}