summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorFredrik Meringdal <fmeringdal@hotmail.com>2020-10-27 21:35:30 +0100
committerFredrik Meringdal <fmeringdal@hotmail.com>2020-10-27 21:35:30 +0100
commitcc3cd851849b01e30c5d43e072eea376fe6596e5 (patch)
treea1564616b879e8daa72a46d79ef58f2cef044421 /src/lib.rs
parent0e892cdc0415477b783af1e732fffd1a4444ce3a (diff)
downloadrust_rrule-cc3cd851849b01e30c5d43e072eea376fe6596e5.zip
Yeeah, better error handling and tests passing
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 252c7e3..5a12e32 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -11,7 +11,7 @@
//! use rrule::build_rrule;
//!
//! // Parse a RRule string, return a RRule type
-//! let mut rrule = build_rrule("DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR");
+//! let mut rrule = build_rrule("DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR").unwrap();
//! assert_eq!(rrule.all().len(), 21);
//! ```
//!
@@ -24,7 +24,7 @@
//! use rrule::build_rruleset;
//!
//! // Parse a RRuleSet string, return a RRuleSet type
-//! let mut rrule = build_rruleset("DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z");
+//! let mut rrule = build_rruleset("DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z").unwrap();
//! assert_eq!(rrule.all().len(), 6);
//! ```
//!
@@ -46,7 +46,8 @@
//! .dtstart(UTC.ymd(2020, 1, 1).and_hms(9, 0, 0))
//! .count(5)
//! .freq(Frequenzy::Daily)
-//! .build();
+//! .build()
+//! .unwrap();
//!
//! // Construct `RRule` from options
//! let mut rrule = RRule::new(options);
@@ -75,7 +76,8 @@
//! .count(4)
//! .freq(Frequenzy::Weekly)
//! .byweekday(vec![Weekday::Tue, Weekday::Wed])
-//! .build();
+//! .build()
+//! .unwrap();
//!
//! // Construct `RRule` from options
//! let mut rrule = RRule::new(rrule_options);
@@ -87,7 +89,8 @@
//! .count(4)
//! .freq(Frequenzy::Weekly)
//! .byweekday(vec![Weekday::Wed])
-//! .build();
+//! .build()
+//! .unwrap();
//!
//! // Construct `RRule` from options
//! let mut exrule = RRule::new(exrule_options);
@@ -137,7 +140,8 @@
//! .dtstart(Berlin.ymd(2020, 1, 1).and_hms(9, 0, 0))
//! .count(4)
//! .freq(Frequenzy::Daily)
-//! .build();
+//! .build()
+//! .unwrap();
//!
//! let mut rrule = RRule::new(rrule_options);
//!