mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 02:22:21 +00:00
fix some dumb design decisions
This commit is contained in:
@@ -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"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user