Don't crash if a calender contains an all-day event
This commit is contained in:
@@ -240,11 +240,10 @@ fn parse_dates(params: Option<Vec<(String, Vec<String>)>>, value: &str) -> Vec<D
|
||||
.map(|(_, values)| values)
|
||||
.filter(|values| values.len() == 1)
|
||||
.next()
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.next()
|
||||
.unwrap();
|
||||
let tz: chrono_tz::Tz = if let Ok(tz) = tz.parse() {
|
||||
.and_then(|values| values.into_iter().next())
|
||||
.and_then(|tz| tz.parse().ok());
|
||||
|
||||
let tz: chrono_tz::Tz = if let Some(tz) = tz {
|
||||
tz
|
||||
} else {
|
||||
return vec![];
|
||||
|
||||
Reference in New Issue
Block a user