mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
resourcetype: Proper namespace handling
This commit is contained in:
@@ -64,7 +64,7 @@ pub trait Resource: Clone + 'static {
|
||||
type Error: ResponseError + From<crate::Error>;
|
||||
type PrincipalResource: Resource;
|
||||
|
||||
fn get_resourcetype(&self) -> &'static [&'static str];
|
||||
fn get_resourcetype(&self) -> Resourcetype;
|
||||
|
||||
fn list_props() -> Vec<&'static str> {
|
||||
[Self::PropName::VARIANTS, CommonPropertiesPropName::VARIANTS].concat()
|
||||
@@ -78,7 +78,7 @@ pub trait Resource: Clone + 'static {
|
||||
) -> Result<CommonPropertiesProp, Self::Error> {
|
||||
Ok(match prop {
|
||||
CommonPropertiesPropName::Resourcetype => {
|
||||
CommonPropertiesProp::Resourcetype(Resourcetype(self.get_resourcetype()))
|
||||
CommonPropertiesProp::Resourcetype(self.get_resourcetype())
|
||||
}
|
||||
CommonPropertiesPropName::CurrentUserPrincipal => {
|
||||
CommonPropertiesProp::CurrentUserPrincipal(
|
||||
|
||||
Reference in New Issue
Block a user