mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 12:52:27 +00:00
resource: change some type signatures
This commit is contained in:
@@ -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()),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user