From 10dac17ce173e584fc857f717f645c05b7cd42ac Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 28 May 2024 12:43:20 +0200 Subject: fix report --- aero-dav/src/versioningdecoder.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'aero-dav') diff --git a/aero-dav/src/versioningdecoder.rs b/aero-dav/src/versioningdecoder.rs index 9e58d8c..c28c0d5 100644 --- a/aero-dav/src/versioningdecoder.rs +++ b/aero-dav/src/versioningdecoder.rs @@ -68,9 +68,7 @@ impl QRead> for ReportName { impl QRead> for Report { async fn qread(xml: &mut Reader) -> Result { - xml.open(DAV_URN, "report").await?; - - let final_result = if xml.maybe_open(DAV_URN, "version-tree").await?.is_some() { + if xml.maybe_open(DAV_URN, "version-tree").await?.is_some() { xml.close().await?; tracing::warn!("version-tree is not implemented, skipping"); Ok(Report::VersionTree) @@ -80,10 +78,7 @@ impl QRead> for Report { Ok(Report::ExpandProperty) } else { E::ReportType::qread(xml).await.map(Report::Extension) - }; - - xml.close().await?; - final_result + } } } -- cgit v1.2.3