From a998b3856b2fdf7f43c05ee6dc23023175197aa1 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Thu, 1 Oct 2020 18:06:23 -0600 Subject: [PATCH] Reexport chrono duration --- sprinklers_core/src/schedule.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sprinklers_core/src/schedule.rs b/sprinklers_core/src/schedule.rs index db0e80a..bcf3532 100644 --- a/sprinklers_core/src/schedule.rs +++ b/sprinklers_core/src/schedule.rs @@ -1,13 +1,15 @@ //! Scheduling for events to run at certain intervals in the future use chrono::{ - Date, DateTime, Datelike, Duration as CDuration, Local, NaiveDateTime, NaiveTime, TimeZone, + Date, DateTime, Datelike, Local, NaiveDateTime, NaiveTime, TimeZone, Weekday, }; use serde::{Deserialize, Serialize}; use std::cmp; use std::iter::FromIterator; +pub use chrono::Duration; + /// A set of times of day (for [Schedule](struct.Schedule.html)) pub type TimeSet = Vec; /// A set of days of week (for [Schedule](struct.Schedule.html)) @@ -380,7 +382,7 @@ impl Schedule { .and_time(*time) .map(|date| { if date < reference { - date + CDuration::weeks(1) + date + Duration::weeks(1) } else { date }