This commit is contained in:
Lennart
2024-09-29 15:14:36 +02:00
parent 48abbb7ac3
commit b35e50bf76
5 changed files with 9 additions and 10 deletions

View File

@@ -67,7 +67,7 @@ pub trait HandlePropfind {
async fn propfind(
&self,
prefix: &str,
path: String,
path: &str,
props: Vec<&str>,
) -> Result<impl Serialize, Self::Error>;
}
@@ -79,7 +79,7 @@ impl<R: Resource> HandlePropfind for R {
async fn propfind(
&self,
prefix: &str,
path: String,
path: &str,
mut props: Vec<&str>,
) -> Result<ResponseElement<PropstatWrapper<R::Prop>>, R::Error> {
if props.contains(&"propname") {
@@ -94,7 +94,7 @@ impl<R: Resource> HandlePropfind for R {
.map(|&prop| prop.to_string())
.collect();
return Ok(ResponseElement {
href: path,
href: path.to_owned(),
propstat: vec![PropstatWrapper::TagList(PropstatElement {
prop: TagList::from(props),
status: format!("HTTP/1.1 {}", StatusCode::OK),
@@ -147,7 +147,7 @@ impl<R: Resource> HandlePropfind for R {
}));
}
Ok(ResponseElement {
href: path,
href: path.to_owned(),
propstat: propstats,
..Default::default()
})