diff options
Diffstat (limited to 'aero-dav')
-rw-r--r-- | aero-dav/src/caldecoder.rs | 8 | ||||
-rw-r--r-- | aero-dav/src/calencoder.rs | 12 |
2 files changed, 6 insertions, 14 deletions
diff --git a/aero-dav/src/caldecoder.rs b/aero-dav/src/caldecoder.rs index 7de5e2a..b6a843f 100644 --- a/aero-dav/src/caldecoder.rs +++ b/aero-dav/src/caldecoder.rs @@ -917,15 +917,11 @@ impl QRead<TimeRange> for TimeRange { xml.open(CAL_URN, "time-range").await?; let start = match xml.prev_attr("start") { - Some(r) => { - Some(NaiveDateTime::parse_from_str(r.as_str(), UTC_DATETIME_FMT)?.and_utc()) - } + Some(r) => Some(NaiveDateTime::parse_from_str(r.as_str(), UTC_DATETIME_FMT)?.and_utc()), _ => None, }; let end = match xml.prev_attr("end") { - Some(r) => { - Some(NaiveDateTime::parse_from_str(r.as_str(), UTC_DATETIME_FMT)?.and_utc()) - } + Some(r) => Some(NaiveDateTime::parse_from_str(r.as_str(), UTC_DATETIME_FMT)?.and_utc()), _ => None, }; diff --git a/aero-dav/src/calencoder.rs b/aero-dav/src/calencoder.rs index d5d4305..723d95d 100644 --- a/aero-dav/src/calencoder.rs +++ b/aero-dav/src/calencoder.rs @@ -739,19 +739,15 @@ impl QWrite for TimeRange { "start", format!("{}", start.format(UTC_DATETIME_FMT)).as_str(), )), - Self::OnlyEnd(end) => empty.push_attribute(( - "end", - format!("{}", end.format(UTC_DATETIME_FMT)).as_str(), - )), + Self::OnlyEnd(end) => { + empty.push_attribute(("end", format!("{}", end.format(UTC_DATETIME_FMT)).as_str())) + } Self::FullRange(start, end) => { empty.push_attribute(( "start", format!("{}", start.format(UTC_DATETIME_FMT)).as_str(), )); - empty.push_attribute(( - "end", - format!("{}", end.format(UTC_DATETIME_FMT)).as_str(), - )); + empty.push_attribute(("end", format!("{}", end.format(UTC_DATETIME_FMT)).as_str())); } } xml.q.write_event_async(Event::Empty(empty)).await |