From 00ba4141d5bb41f0ffc014c76bfdafcec7c02b6b Mon Sep 17 00:00:00 2001 From: Fredrik Meringdal Date: Tue, 3 Nov 2020 23:22:51 +0100 Subject: using lazy_static instead of once_cell --- src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 035496d..af5fd29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,8 @@ //! - `between`: Generate all recurrences that matches the rules and are between two given dates //! - `before`: Generate the last recurrence that matches the rules and is before a given date //! - `after`: Generate the first recurrence that matches the rules and is after a given date -//! All the generated recurrence will be in the same time zone as the dtstart property. +//! +//! Note: All the generated recurrence will be in the same time zone as the dtstart property. //! //! # Examples //! @@ -29,14 +30,14 @@ //! //! use rrule::RRule; //! -//! // Parse a RRule string, return a RRul to get e type +//! // Parse a RRule string //! let mut rrule: RRule = "DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR".parse().unwrap(); //! assert_eq!(rrule.all().len(), 21); //! //! //! use rrule::RRuleSet; //! -//! // Parse a RRuleSet string, return a RRuleSet type +//! // Parse a RRuleSet string //! let mut rrule_set: RRuleSet = "DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z".parse().unwrap(); //! assert_eq!(rrule_set.all().len(), 4); //! ``` @@ -120,7 +121,7 @@ //! rrule_set.exrule(exrule); //! //! let recurrences = rrule_set.all(); -//! +//! //! // Check that all the recurrences are on a Tuesday //! for occurence in &recurrences { //! assert_eq!(occurence.weekday(), Weekday::Tue); @@ -191,8 +192,9 @@ extern crate chrono; extern crate chrono_tz; -extern crate once_cell; extern crate regex; +#[macro_use] +extern crate lazy_static; mod datetime; mod iter; -- cgit v1.2.3