[minor] Fixed case for an enum

This commit is contained in:
daladim
2021-03-28 19:47:06 +02:00
parent 7e3bccb5ad
commit 5e6eb6863c
+5 -5
View File
@@ -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<minidom::Element> 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> {