Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lennart-k committed Nov 5, 2024
1 parent d5ef666 commit f1c43a8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/dav/src/resource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl<T: FromStr + VariantNames> ResourcePropName for T {}
pub trait ResourceType: Serialize + for<'de> Deserialize<'de> {}
impl<T: Serialize + for<'de> Deserialize<'de>> ResourceType for T {}

#[derive(Deserialize, Serialize, PartialEq)]
#[derive(Deserialize, Serialize, PartialEq, Default)]
#[serde(rename_all = "kebab-case")]
pub enum CommonPropertiesProp {
// WebDAV (RFC 2518)
Expand All @@ -41,6 +41,7 @@ pub enum CommonPropertiesProp {
Owner(Option<HrefElement>),

#[serde(other)]
#[default]
Invalid,
}

Expand All @@ -52,12 +53,6 @@ pub enum EitherProp<Left: ResourceProp, Right: ResourceProp> {
Right(Right),
}

impl InvalidProperty for CommonPropertiesProp {
fn invalid_property(&self) -> bool {
matches!(self, Self::Invalid)
}
}

#[derive(EnumString, VariantNames, Clone)]
#[strum(serialize_all = "kebab-case")]
pub enum CommonPropertiesPropName {
Expand Down

0 comments on commit f1c43a8

Please sign in to comment.