@@ -96,23 +96,22 @@ impl Cron {
9696/// ``` 
9797/// use croner::Cron; 
9898/// use chrono::Local; 
99- /// fn main() { 
100- ///     // Parse cron expression 
101- ///     let cron: Cron = "0 * * * * *".parse().expect("Couldn't parse cron string"); 
102- /// 
103- ///     // Compare to time now 
104- ///     let time = Local::now(); 
105- ///     let matches_all = cron.is_time_matching(&time).unwrap(); 
106- /// 
107- ///     // Output results 
108- ///     println!("Time is: {}", time); 
109- ///     println!( 
110- ///         "Pattern \"{}\" does {} time {}", 
111- ///         cron.pattern.to_string(), 
112- ///         if matches_all { "match" } else { "not match" }, 
113- ///         time 
114- ///     ); 
115- /// } 
99+ /// 
100+ /// // Parse cron expression 
101+ /// let cron: Cron = "0 * * * * *".parse().expect("Couldn't parse cron string"); 
102+ /// 
103+ /// // Compare to time now 
104+ /// let time = Local::now(); 
105+ /// let matches_all = cron.is_time_matching(&time).unwrap(); 
106+ /// 
107+ /// // Output results 
108+ /// println!("Time is: {}", time); 
109+ /// println!( 
110+ ///     "Pattern \"{}\" does {} time {}", 
111+ ///     cron.pattern.to_string(), 
112+ ///     if matches_all { "match" } else { "not match" }, 
113+ ///     time 
114+ /// ); 
116115/// ``` 
117116pub  fn  is_time_matching < Tz :  TimeZone > ( & self ,  time :  & DateTime < Tz > )  -> Result < bool ,  CronError >  { 
118117        Ok ( self . pattern . second_match ( time. second ( ) ) ?
@@ -160,20 +159,18 @@ impl Cron {
160159/// use chrono::Local; 
161160/// use croner::Cron; 
162161/// 
163- /// fn main() { 
164- ///     // Parse cron expression 
165- ///     let cron: Cron = "0 18 * * * 5".parse().expect("Couldn't parse cron string"); 
162+ /// // Parse cron expression 
163+ /// let cron: Cron = "0 18 * * * 5".parse().expect("Couldn't parse cron string"); 
166164/// 
167- ///      // Get next match 
168- ///      let time = Local::now(); 
169- ///      let next = cron.find_next_occurrence(&time, false).unwrap(); 
165+ /// // Get next match 
166+ /// let time = Local::now(); 
167+ /// let next = cron.find_next_occurrence(&time, false).unwrap(); 
170168/// 
171- ///     println!( 
172- ///         "Pattern \"{}\" will match next time at {}", 
173- ///         cron.pattern.to_string(), 
174- ///         next 
175- ///     ); 
176- /// } 
169+ /// println!( 
170+ ///     "Pattern \"{}\" will match next time at {}", 
171+ ///     cron.pattern.to_string(), 
172+ ///     next 
173+ /// ); 
177174/// ``` 
178175pub  fn  find_next_occurrence < Tz :  TimeZone > ( 
179176        & self , 
@@ -209,20 +206,18 @@ impl Cron {
209206/// use chrono::Local; 
210207/// use croner::Cron; 
211208/// 
212- /// fn main() { 
213- ///     // Parse cron expression 
214- ///     let cron: Cron = "* * * * * *".parse().expect("Couldn't parse cron string"); 
209+ /// // Parse cron expression 
210+ /// let cron: Cron = "* * * * * *".parse().expect("Couldn't parse cron string"); 
215211/// 
216- ///      // Compare to time now 
217- ///      let time = Local::now(); 
212+ /// // Compare to time now 
213+ /// let time = Local::now(); 
218214/// 
219- ///      // Get next 5 matches using iter_from 
220- ///      println!("Finding matches of pattern '{}' starting from {}:", cron.pattern.to_string(), time); 
215+ /// // Get next 5 matches using iter_from 
216+ /// println!("Finding matches of pattern '{}' starting from {}:", cron.pattern.to_string(), time); 
221217/// 
222- ///     for time in cron.clone().iter_from(time).take(5) { 
223- ///         println!("{}", time); 
224- ///     } 
225- /// }     
218+ /// for time in cron.clone().iter_from(time).take(5) { 
219+ ///     println!("{}", time); 
220+ /// } 
226221/// ``` 
227222/// 
228223/// # Parameters 
@@ -253,20 +248,19 @@ impl Cron {
253248/// use chrono::Local; 
254249/// use croner::Cron; 
255250/// 
256- /// fn main() { 
257- ///     // Parse cron expression 
258- ///     let cron: Cron = "* * * * * *".parse().expect("Couldn't parse cron string"); 
251+ /// // Parse cron expression 
252+ /// let cron: Cron = "* * * * * *".parse().expect("Couldn't parse cron string"); 
259253/// 
260- ///      // Compare to time now 
261- ///      let time = Local::now(); 
254+ /// // Compare to time now 
255+ /// let time = Local::now(); 
262256/// 
263- ///      // Get next 5 matches using iter_from 
264- ///      println!("Finding matches of pattern '{}' starting from {}:", cron.pattern.to_string(), time); 
257+ /// // Get next 5 matches using iter_from 
258+ /// println!("Finding matches of pattern '{}' starting from {}:", cron.pattern.to_string(), time); 
265259/// 
266- ///      for time in cron.clone().iter_after(time).take(5) { 
267- ///          println!("{}", time); 
268- ///      } 
269- /// }      
260+ /// for time in cron.clone().iter_after(time).take(5) { 
261+ ///     println!("{}", time); 
262+ /// } 
263+ ///   
270264/// ``` 
271265/// 
272266/// # Parameters 
0 commit comments