diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-31 18:15:21 +0100 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-31 18:15:21 +0100 |
commit | a600a4e88053a89670aa4bdec0800089018f5c1c (patch) | |
tree | 8911ff0dbb9ba184573630aca58a241157a4234a /src/options.rs | |
parent | 93a7edadb0b920752d17c170aa02eda1d4953134 (diff) | |
download | rust_rrule-a600a4e88053a89670aa4bdec0800089018f5c1c.zip |
removed more unwraps
Diffstat (limited to 'src/options.rs')
-rw-r--r-- | src/options.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/options.rs b/src/options.rs index 7b5c7e3..884ecb6 100644 --- a/src/options.rs +++ b/src/options.rs @@ -1,7 +1,7 @@ +use crate::datetime::{get_weekday_val, DTime}; +use crate::parse_options::parse_options; use chrono::prelude::*; use chrono_tz::Tz; -use crate::datetime::{DTime, get_weekday_val}; -use crate::parse_options::parse_options; use std::error::Error; use std::fmt::{Display, Formatter}; @@ -92,7 +92,7 @@ impl Options { fn is_some_or_none<'a, T>(prop1: &'a Option<T>, prop2: &'a Option<T>) -> &'a Option<T> { if prop2.is_some() { return prop2; - } + } prop1 } @@ -177,7 +177,7 @@ impl Options { } pub fn byweekday(mut self, byweekday: Vec<Weekday>) -> Self { - let byweekday = byweekday.iter().map(|w| get_weekday_val(w)).collect(); + let byweekday = byweekday.iter().map(|w| get_weekday_val(w)).collect(); self.byweekday = Some(byweekday); self } @@ -216,4 +216,4 @@ impl Display for RRuleParseError { } } -impl Error for RRuleParseError{}
\ No newline at end of file +impl Error for RRuleParseError {} |