summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNora <nora.widdecke@tu-bs.de>2019-03-11 12:07:23 +0100
committerNora <nora.widdecke@tu-bs.de>2019-03-11 12:07:23 +0100
commit7aa3f7a4907d27f0685d6e6b8e84556dac85e0ab (patch)
tree629a61ce67a8fbfffd4281c7e67882bd1e5626ca
parente0d47a54ad12ca72982ecdd792b05bb792819675 (diff)
cleanup
-rw-r--r--src/actions/edit.rs4
-rw-r--r--src/actions/new.rs1
-rw-r--r--src/icalwrap/icalvcalendar.rs1
-rw-r--r--src/khevent.rs7
-rw-r--r--src/selectors/prop.rs1
-rw-r--r--src/testdata.rs4
6 files changed, 2 insertions, 16 deletions
diff --git a/src/actions/edit.rs b/src/actions/edit.rs
index a9cec83..9d1abf8 100644
--- a/src/actions/edit.rs
+++ b/src/actions/edit.rs
@@ -34,7 +34,6 @@ mod integration {
use super::*;
use crate::testutils::prepare_testdir;
- use crate::icalwrap::IcalComponent;
#[test]
fn edit_test() {
@@ -45,10 +44,7 @@ mod integration {
assert!(edit(&khline).is_ok());
let event = khline.to_event().unwrap();
- let dtstamp_prop = ical::icalproperty_kind_ICAL_DTSTAMP_PROPERTY;
assert_eq!("20130101T010203Z", event.get_dtstamp().unwrap());
-
- let last_modified_kind = ical::icalproperty_kind_ICAL_LASTMODIFIED_PROPERTY;
assert_eq!("20130101T010203Z", event.get_last_modified().unwrap());
}
}
diff --git a/src/actions/new.rs b/src/actions/new.rs
index 5aeca84..3e8fbf5 100644
--- a/src/actions/new.rs
+++ b/src/actions/new.rs
@@ -145,7 +145,6 @@ mod integration {
use super::*;
use crate::testutils;
use crate::testdata;
- use crate::khevent::KhEvent;
#[test]
fn test_parse_calendar() {
diff --git a/src/icalwrap/icalvcalendar.rs b/src/icalwrap/icalvcalendar.rs
index ebc5046..adbe513 100644
--- a/src/icalwrap/icalvcalendar.rs
+++ b/src/icalwrap/icalvcalendar.rs
@@ -373,7 +373,6 @@ impl Drop for IcalComponentOwner {
mod tests {
use super::*;
use crate::testdata;
- use crate::khevent::KhEvent;
use chrono::{Local,TimeZone};
#[test]
diff --git a/src/khevent.rs b/src/khevent.rs
index ff4acc1..e329ddf 100644
--- a/src/khevent.rs
+++ b/src/khevent.rs
@@ -110,12 +110,6 @@ impl KhEvent {
}
}
- //pub fn get_recur_instances(&self) -> impl Iterator<Item = KhEvent> + '_ {
- //self.event
- //.get_recur_instances()
- //.map(|event| KhEvent::from_event_with_timestamp(event, event.instance_timestamp))
- //}
-
pub fn get_recur_instances(&self) -> impl Iterator<Item = KhEvent> + '_ {
self.get_recur_datetimes().into_iter()
.map(|recur_utc| recur_utc.with_timezone(&IcalTimeZone::local()))
@@ -152,7 +146,6 @@ mod tests {
use crate::testdata;
use crate::icalwrap::IcalVCalendar;
use crate::icalwrap::IcalTimeZone;
- use chrono::NaiveDate;
#[test]
fn test_is_recur_valid_master() {
diff --git a/src/selectors/prop.rs b/src/selectors/prop.rs
index d5045ad..b9b566e 100644
--- a/src/selectors/prop.rs
+++ b/src/selectors/prop.rs
@@ -3,7 +3,6 @@ use std::collections::HashMap;
use super::*;
use crate::khevent::KhEvent;
-use crate::icalwrap::IcalComponent;
pub struct PropFilter {
terms: HashMap<String,Vec<String>>
diff --git a/src/testdata.rs b/src/testdata.rs
index c242df3..b975699 100644
--- a/src/testdata.rs
+++ b/src/testdata.rs
@@ -248,14 +248,14 @@ pub fn setup() {
}
#[cfg(test)]
-use crate::icalwrap::{IcalVCalendar, IcalVEvent};
+use crate::icalwrap::IcalVCalendar;
use crate::khevent::KhEvent;
#[cfg(test)]
use std::path::Path;
#[cfg(test)]
pub fn get_test_event(str: &str, path: Option<&Path>) -> KhEvent {
IcalVCalendar::from_str(str, path)
- .map(|cal| KhEvent::from_event(cal.get_principal_event()))
+ .map(|cal| cal.get_principal_khevent())
.unwrap()
}