diff options
Diffstat (limited to '')
-rw-r--r-- | src/event.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/event.rs b/src/event.rs index e8cfceb..f58519a 100644 --- a/src/event.rs +++ b/src/event.rs @@ -16,6 +16,7 @@ pub struct Event { pub location: String, pub description: String, pub status: Status, + pub calendar: String } #[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq)] @@ -33,7 +34,7 @@ pub enum End { impl Event { - pub fn new() -> Event { + pub fn new(calendar: &Option<String>) -> Event { return Event { summary: "".to_string(), location: "".to_string(), @@ -41,6 +42,10 @@ impl Event { status: Status::Confirmed, start: Date::new(), end: End::Date(Date::new()), + calendar: match calendar { + None => "[unknown calendar]".to_string(), + Some(a) => a.to_string() + } }; } |