From a600a4e88053a89670aa4bdec0800089018f5c1c Mon Sep 17 00:00:00 2001 From: Fredrik Meringdal Date: Sat, 31 Oct 2020 18:15:21 +0100 Subject: removed more unwraps --- src/rruleset.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/rruleset.rs') diff --git a/src/rruleset.rs b/src/rruleset.rs index 810c18e..4a3caa5 100644 --- a/src/rruleset.rs +++ b/src/rruleset.rs @@ -1,8 +1,8 @@ -use chrono::prelude::*; -use chrono_tz::{Tz, UTC}; -use crate::rrule::RRule; use crate::datetime::DTime; +use crate::rrule::RRule; use crate::rruleset_iter::RRuleSetIter; +use chrono::prelude::*; +use chrono_tz::{Tz, UTC}; #[derive(Debug)] pub struct RRuleSet { @@ -81,14 +81,7 @@ mod test_iter_set { use super::*; use crate::options::*; - fn ymd_hms( - year: i32, - month: u32, - day: u32, - hour: u32, - minute: u32, - second: u32, - ) -> DTime { + fn ymd_hms(year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32) -> DTime { UTC.ymd(year, month, day).and_hms(hour, minute, second) } -- cgit v1.2.3