Skip to content

Commit

Permalink
Do not en RRULE with ;
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Jun 19, 2024
1 parent 81bd1f5 commit 95e9b8b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions toml-to-ical/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ struct Interval(u16);

impl fmt::Display for Interval {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "INTERVAL={};", self.0)
write!(f, ";INTERVAL={}", self.0)
}
}

Expand All @@ -779,7 +779,7 @@ struct Count(u32);

impl fmt::Display for Count {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "COUNT={};", self.0)
write!(f, ";COUNT={}", self.0)
}
}

Expand All @@ -790,7 +790,7 @@ struct Until(UtcDateTime);

impl fmt::Display for Until {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "UNTIL={};", self.0.to_ical_format())
write!(f, ";UNTIL={}", self.0.to_ical_format())
}
}

Expand All @@ -802,7 +802,7 @@ struct BySecond(Vec<u16>);
impl fmt::Display for BySecond {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYSEC={};", as_strs.join(","))
write!(f, ";BYSEC={}", as_strs.join(","))
}
}

Expand All @@ -814,7 +814,7 @@ struct ByMinute(Vec<u16>);
impl fmt::Display for ByMinute {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYMINUTE={};", as_strs.join(","))
write!(f, ";BYMINUTE={}", as_strs.join(","))
}
}

Expand All @@ -826,7 +826,7 @@ struct ByHour(Vec<u16>);
impl fmt::Display for ByHour {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYHOUR={};", as_strs.join(","))
write!(f, ";BYHOUR={}", as_strs.join(","))
}
}

Expand Down Expand Up @@ -890,7 +890,7 @@ struct ByDay(Vec<WeekdayNum>);
impl fmt::Display for ByDay {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYDAY={};", as_strs.join(","))
write!(f, ";BYDAY={}", as_strs.join(","))
}
}

Expand All @@ -902,7 +902,7 @@ struct ByMonthDay(Vec<i16>);
impl fmt::Display for ByMonthDay {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYMONTHDAY={};", as_strs.join(","))
write!(f, ";BYMONTHDAY={}", as_strs.join(","))
}
}

Expand All @@ -914,7 +914,7 @@ struct ByYearDay(Vec<i16>);
impl fmt::Display for ByYearDay {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYYEARDAY={};", as_strs.join(","))
write!(f, ";BYYEARDAY={}", as_strs.join(","))
}
}

Expand All @@ -926,7 +926,7 @@ struct ByWeekNo(Vec<i16>);
impl fmt::Display for ByWeekNo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYWEEKNO={};", as_strs.join(","))
write!(f, ";BYWEEKNO={}", as_strs.join(","))
}
}

Expand All @@ -938,7 +938,7 @@ struct ByMonth(Vec<u8>);
impl fmt::Display for ByMonth {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let as_strs: Vec<_> = self.0.iter().map(ToString::to_string).collect();
write!(f, "BYMONTH={};", as_strs.join(","))
write!(f, ";BYMONTH={}", as_strs.join(","))
}
}

Expand All @@ -949,7 +949,7 @@ struct WeekStart(Weekday);

impl fmt::Display for WeekStart {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "WKST={};", self.0)
write!(f, ";WKST={}", self.0)
}
}

Expand Down Expand Up @@ -987,7 +987,7 @@ struct RecurrenceRule {

impl fmt::Display for RecurrenceRule {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "RRULE:FREQ={};", self.frequency)?;
write!(f, "RRULE:FREQ={}", self.frequency)?;
if let Some(interval) = &self.interval {
write!(f, "{interval}")?;
}
Expand Down

0 comments on commit 95e9b8b

Please sign in to comment.