resource: change some type signatures

This commit is contained in:
Lennart
2024-11-02 11:49:55 +01:00
parent 0c14f8ba90
commit f92be513dc
10 changed files with 15 additions and 15 deletions

View File

@@ -75,7 +75,7 @@ impl Resource for AddressObjectResource {
&self,
rmap: &ResourceMap,
user: &User,
prop: Self::PropName,
prop: &Self::PropName,
) -> Result<Self::Prop, Self::Error> {
Ok(match prop {
AddressObjectPropName::Getetag => AddressObjectProp::Getetag(self.object.get_etag()),

View File

@@ -101,7 +101,7 @@ impl Resource for AddressbookResource {
&self,
rmap: &ResourceMap,
user: &User,
prop: Self::PropName,
prop: &Self::PropName,
) -> Result<Self::Prop, Self::Error> {
Ok(match prop {
AddressbookPropName::Resourcetype => {
@@ -163,7 +163,7 @@ impl Resource for AddressbookResource {
}
}
fn remove_prop(&mut self, prop: Self::PropName) -> Result<(), rustical_dav::Error> {
fn remove_prop(&mut self, prop: &Self::PropName) -> Result<(), rustical_dav::Error> {
match prop {
AddressbookPropName::Resourcetype => Err(rustical_dav::Error::PropReadOnly),
AddressbookPropName::CurrentUserPrincipal => Err(rustical_dav::Error::PropReadOnly),

View File

@@ -84,7 +84,7 @@ impl Resource for PrincipalResource {
&self,
rmap: &ResourceMap,
user: &User,
prop: Self::PropName,
prop: &Self::PropName,
) -> Result<Self::Prop, Self::Error> {
let principal_href = HrefElement::new(Self::get_principal_url(rmap, &self.principal));

View File

@@ -58,7 +58,7 @@ impl Resource for RootResource {
&self,
rmap: &ResourceMap,
user: &User,
prop: Self::PropName,
prop: &Self::PropName,
) -> Result<Self::Prop, Self::Error> {
Ok(match prop {
RootPropName::Resourcetype => RootProp::Resourcetype(Resourcetype::default()),