diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-12 15:17:23 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-12 16:33:39 +0100 |
commit | 5216a30ac92716aa16b8760bd9048820a7466f33 (patch) | |
tree | 1411be204a546433d3273d5169c53dfcf071a6e1 /src/icalwrap | |
parent | e53d9eda3c19a3a209f9470a0307083f06e4e69c (diff) |
introduce KhLine struct for khaleesi lines
Diffstat (limited to 'src/icalwrap')
-rw-r--r-- | src/icalwrap/icalvcalendar.rs | 8 | ||||
-rw-r--r-- | src/icalwrap/icalvevent.rs | 7 |
2 files changed, 0 insertions, 15 deletions
diff --git a/src/icalwrap/icalvcalendar.rs b/src/icalwrap/icalvcalendar.rs index 04c600d..19c182c 100644 --- a/src/icalwrap/icalvcalendar.rs +++ b/src/icalwrap/icalvcalendar.rs @@ -370,14 +370,6 @@ mod tests { } #[test] - fn get_khaleesi_line_test() { - let path = PathBuf::from("test/path"); - let cal = IcalVCalendar::from_str(testdata::TEST_EVENT_MULTIDAY_ALLDAY, Some(&path)).unwrap(); - let event = cal.get_principal_event(); - assert_eq!(String::from("1182988800 test/path"), event.get_khaleesi_line().unwrap()) - } - - #[test] fn get_calendar_name_test() { let path = PathBuf::from("calname/event"); let cal = IcalVCalendar::from_str(testdata::TEST_EVENT_MULTIDAY_ALLDAY, Some(&path)).unwrap(); diff --git a/src/icalwrap/icalvevent.rs b/src/icalwrap/icalvevent.rs index 658a757..d51003f 100644 --- a/src/icalwrap/icalvevent.rs +++ b/src/icalwrap/icalvevent.rs @@ -139,13 +139,6 @@ impl IcalVEvent { self.parent.as_ref() } - pub fn get_khaleesi_line(&self) -> Option<String> { - let dtstart = self.get_dtstart()?.timestamp(); - let dtstart_string = format!("{:010}", dtstart); - let path_string = self.parent.as_ref()?.get_path_as_string()?; - Some([dtstart_string, path_string].join(" ")) - } - pub fn get_summary(&self) -> Option<String> { unsafe { let ptr = ical::icalcomponent_get_summary(self.ptr); |