fix some dumb design decisions

This commit is contained in:
Lennart
2024-11-04 17:57:09 +01:00
parent 0fed7b05fa
commit c41e3e3abb
9 changed files with 17 additions and 72 deletions

View File

@@ -5,7 +5,7 @@ use async_trait::async_trait;
use derive_more::derive::{From, Into, TryInto};
use rustical_dav::{
extension::BoxedExtension,
extensions::{CommonPropertiesExtension, CommonPropertiesProp, CommonPropertiesPropName},
extensions::{CommonPropertiesExtension, CommonPropertiesProp},
privileges::UserPrivilegeSet,
resource::{InvalidProperty, Resource, ResourceService},
};
@@ -22,16 +22,12 @@ pub struct CalendarObjectResourceService<C: CalendarStore + ?Sized> {
pub object_id: String,
}
#[derive(EnumString, VariantNames, Clone, From, TryInto)]
#[derive(EnumString, VariantNames, Clone)]
#[strum(serialize_all = "kebab-case")]
pub enum CalendarObjectPropName {
Getetag,
CalendarData,
Getcontenttype,
#[from]
#[try_into]
#[strum(disabled)]
ExtCommonProperties(CommonPropertiesPropName),
}
#[derive(Deserialize, Serialize, From, TryInto)]
@@ -99,7 +95,6 @@ impl Resource for CalendarObjectResource {
CalendarObjectPropName::Getcontenttype => {
CalendarObjectProp::Getcontenttype("text/calendar;charset=utf-8".to_owned())
}
_ => panic!("we shouldn't end up here"),
})
}