From 5e6eb6863c5c2b46afeb870bcecf64e9226d9e38 Mon Sep 17 00:00:00 2001 From: daladim Date: Wed, 24 Feb 2021 17:22:38 +0100 Subject: [PATCH] [minor] Fixed case for an enum --- src/calendar.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/calendar.rs b/src/calendar.rs index e74aada..251cbe7 100644 --- a/src/calendar.rs +++ b/src/calendar.rs @@ -11,9 +11,9 @@ use bitflags::bitflags; bitflags! { pub struct SupportedComponents: u8 { /// An event, such as a calendar meeting - const Event = 1; + const EVENT = 1; /// A to-do item, such as a reminder - const Todo = 2; + const TODO = 2; } } @@ -30,8 +30,8 @@ impl TryFrom for SupportedComponents { for child in element.children() { match child.attr("name") { None => continue, - Some("VEVENT") => flags.insert(Self::Event), - Some("VTODO") => flags.insert(Self::Todo), + Some("VEVENT") => flags.insert(Self::EVENT), + Some("VTODO") => flags.insert(Self::TODO), Some(other) => { log::warn!("Unimplemented supported component type: {:?}. Ignoring it", other); continue @@ -72,7 +72,7 @@ impl Calendar { /// Returns whether this calDAV calendar supports to-do items pub fn supports_todo(&self) -> bool { - self.supported_components.contains(SupportedComponents::Todo) + self.supported_components.contains(SupportedComponents::TODO) } pub fn tasks(&self) -> Vec<&Task> {