fmeringdal / rust-rrule

Rust crate for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
https://docs.rs/rrule
Apache License 2.0
72 stars 18 forks source link

Serializing and Deserializing RRuleSet yields different RRuleSet #98

Open Dav1dde opened 1 year ago

Dav1dde commented 1 year ago

The Display impl of RRuleSet only serializes the contained rrule's not any of the other information:

https://github.com/fmeringdal/rust-rrule/blob/8da601cd7db2f7edcc8393363f819d57211d8760/rrule/src/core/rruleset.rs#L261-L275

I would expect the following code to yield the same RRuleSet:

rrule_set.to_string().parse::<rrule::RRuleSet>().unwrap()
fmeringdal commented 1 year ago

Thanks for reporting. I will add a fix once time allows, unless someone else picks it up before then

fmeringdal commented 11 months ago

Proposed fix in #100 if you want to try it out before next release. It isn't a complete fix, but should hopefully cover most cases.