diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/iter.rs | 2 | ||||
-rw-r--r-- | src/rrule.rs | 27 | ||||
-rw-r--r-- | src/rruleset.rs | 26 | ||||
-rw-r--r-- | src/rrulestr.rs | 27 |
4 files changed, 2 insertions, 80 deletions
diff --git a/src/iter.rs b/src/iter.rs index 72c0c0a..738cc26 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -83,7 +83,7 @@ impl IterResult for RRuleIterRes { } } - /// before and after returns only one date whereas all and between an array + // before and after returns only one date whereas all and between an array fn get_value(&self) -> Vec<DateTime<Tz>> { match self.method { QueryMethodTypes::BETWEEN | QueryMethodTypes::ALL => self.result.clone(), diff --git a/src/rrule.rs b/src/rrule.rs index b7f53ea..8e8f192 100644 --- a/src/rrule.rs +++ b/src/rrule.rs @@ -4,33 +4,6 @@ use crate::options::*; use chrono::prelude::*; use chrono_tz::{Tz, UTC}; - -/// A type that produces instances of a given a RFC1241 string representation. -/// -/// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property should -/// not be relied upon for security purposes. -/// -/// On Unix systems shell usually expands unquoted arguments with glob patterns -/// (such as `*` and `?`). On Windows this is not done, and such arguments are -/// passed as-is. -/// -/// # Panics -/// -/// The returned iterator will panic during iteration if any argument to the -/// process is not valid unicode. If this is not desired, -/// use the [`args_os`] function instead. -/// -/// # Examples -/// -/// ``` -/// use std::env; -/// -/// // Prints each argument on a separate line -/// for argument in env::args() { -/// println!("{}", argument); -/// } -/// ``` #[derive(Clone, Debug)] pub struct RRule { pub options: ParsedOptions, diff --git a/src/rruleset.rs b/src/rruleset.rs index c6a4356..63e3145 100644 --- a/src/rruleset.rs +++ b/src/rruleset.rs @@ -6,32 +6,6 @@ use chrono::prelude::*; use chrono_tz::{Tz, UTC}; use std::collections::HashMap; -/// A type that produces instances of a given a RFC1241 string representation. -/// -/// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property should -/// not be relied upon for security purposes. -/// -/// On Unix systems shell usually expands unquoted arguments with glob patterns -/// (such as `*` and `?`). On Windows this is not done, and such arguments are -/// passed as-is. -/// -/// # Panics -/// -/// The returned iterator will panic during iteration if any argument to the -/// process is not valid unicode. If this is not desired, -/// use the [`args_os`] function instead. -/// -/// # Examples -/// -/// ``` -/// use std::env; -/// -/// // Prints each argument on a separate line -/// for argument in env::args() { -/// println!("{}", argument); -/// } -/// ``` #[derive(Debug)] pub struct RRuleSet { rrule: Vec<RRule>, diff --git a/src/rrulestr.rs b/src/rrulestr.rs index 996749d..98db39a 100644 --- a/src/rrulestr.rs +++ b/src/rrulestr.rs @@ -433,32 +433,7 @@ fn parse_rdate(rdateval: &str, params: Vec<String>) -> Vec<DateTime<Utc>> { rdateval.split(",").map(|datestr| datestring_to_date(datestr)).collect() } -/// A type that produces instances of a given a RFC1241 string representation. -/// -/// The first element is traditionally the path of the executable, but it can be -/// set to arbitrary text, and may not even exist. This means this property should -/// not be relied upon for security purposes. -/// -/// On Unix systems shell usually expands unquoted arguments with glob patterns -/// (such as `*` and `?`). On Windows this is not done, and such arguments are -/// passed as-is. -/// -/// # Panics -/// -/// The returned iterator will panic during iteration if any argument to the -/// process is not valid unicode. If this is not desired, -/// use the [`args_os`] function instead. -/// -/// # Examples -/// -/// ``` -/// use std::env; -/// -/// // Prints each argument on a separate line -/// for argument in env::args() { -/// println!("{}", argument); -/// } -/// ``` + pub fn build_rule(s: &str) -> RRuleSet { let ParsedInput { mut rrule_vals, |