diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 66 |
1 files changed, 39 insertions, 27 deletions
@@ -1,34 +1,46 @@ #![allow(clippy::redundant_closure)] // disable "redundant closure" lint -#[macro_use] mod macros; - -pub mod errors; -pub type KhResult<T> = Result<T,errors::KhError>; - -pub mod actions; -pub mod backup; -pub mod calendars; -pub mod cli; -pub mod config; -pub mod cursorfile; -pub mod defaults; -pub mod edit; -pub mod icalwrap; -pub mod input; -pub mod khevent; -pub mod khline; -pub mod selectors; -pub mod seqfile; -pub mod utils; -#[cfg(test)] pub mod testutils; -#[cfg(test)] pub mod testdata; #[cfg(test)] #[macro_use] extern crate maplit; #[cfg(test)] #[macro_use] extern crate pretty_assertions; +#[cfg(test)] #[macro_use] extern crate indoc; -use ical; - -#[macro_use] extern crate serde_derive; +extern crate serde_derive; #[macro_use] extern crate log; -#[macro_use] extern crate indoc; #[macro_use] extern crate lazy_static; -#[macro_use] extern crate clap; +extern crate ical; + +// libical does some weird, non-threadsafe things in timezone methods, notably +// icaltime_convert_to_zone (which is also called in icaltime_as_timet_with_zone) +// see these two (independent!) bugs: +// https://github.com/libical/libical/issues/86 +// https://github.com/libical/libical/commit/0ebf2d9a7183be94991c2681c6e3f009c64cf7cc +use std::sync::Mutex; +lazy_static! { + static ref TZ_MUTEX: Mutex<i32> = Mutex::new(0); +} + +pub mod errors; +pub mod component; +pub mod duration; +pub mod property; +pub mod time; +pub mod timezone; +pub mod vcalendar; +pub mod vevent; +pub mod utils; + +#[cfg(test)] +pub mod testdata; + +#[cfg(test)] +pub mod testutils; + +pub use crate::component::IcalComponent; +pub use crate::duration::IcalDuration; +pub use crate::property::IcalProperty; +pub use crate::time::IcalTime; +pub use crate::timezone::IcalTimeZone; +pub use crate::vcalendar::IcalEventIter; +pub use crate::vcalendar::IcalVCalendar; +pub use crate::vevent::IcalVEvent; + |