From 51ec1d7ff9cc678a0e08b1e221af09fc7d8f4296 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 21 May 2024 18:09:21 +0200 Subject: calendar-query filter propertiers --- aero-dav/src/caldecoder.rs | 7 ++----- aero-dav/src/calencoder.rs | 3 --- aero-dav/src/caltypes.rs | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'aero-dav') diff --git a/aero-dav/src/caldecoder.rs b/aero-dav/src/caldecoder.rs index 16c9c6c..b4391a4 100644 --- a/aero-dav/src/caldecoder.rs +++ b/aero-dav/src/caldecoder.rs @@ -805,7 +805,6 @@ impl QRead for PropFilter { impl QRead for PropFilterRules { async fn qread(xml: &mut Reader) -> Result { - let mut time_range = None; let mut time_or_text = None; let mut param_filter = Vec::new(); @@ -817,7 +816,6 @@ impl QRead for PropFilterRules { return Ok(Self::IsNotDefined); } - xml.maybe_read(&mut time_range, &mut dirty).await?; xml.maybe_read(&mut time_or_text, &mut dirty).await?; xml.maybe_push(&mut param_filter, &mut dirty).await?; @@ -829,10 +827,9 @@ impl QRead for PropFilterRules { } } - match (&time_range, &time_or_text, ¶m_filter[..]) { - (None, None, []) => Err(ParsingError::Recoverable), + match (&time_or_text, ¶m_filter[..]) { + (None, []) => Err(ParsingError::Recoverable), _ => Ok(PropFilterRules::Match(PropFilterMatch { - time_range, time_or_text, param_filter, })), diff --git a/aero-dav/src/calencoder.rs b/aero-dav/src/calencoder.rs index 06cafd4..4467f7c 100644 --- a/aero-dav/src/calencoder.rs +++ b/aero-dav/src/calencoder.rs @@ -638,9 +638,6 @@ impl QWrite for PropFilterRules { impl QWrite for PropFilterMatch { async fn qwrite(&self, xml: &mut Writer) -> Result<(), QError> { - if let Some(time_range) = &self.time_range { - time_range.qwrite(xml).await?; - } if let Some(time_or_text) = &self.time_or_text { time_or_text.qwrite(xml).await?; } diff --git a/aero-dav/src/caltypes.rs b/aero-dav/src/caltypes.rs index 7c85642..717086b 100644 --- a/aero-dav/src/caltypes.rs +++ b/aero-dav/src/caltypes.rs @@ -1242,7 +1242,6 @@ pub enum PropFilterRules { } #[derive(Debug, PartialEq, Clone)] pub struct PropFilterMatch { - pub time_range: Option, pub time_or_text: Option, pub param_filter: Vec, } -- cgit v1.2.3