misc: Make error enums unconditionally non_exhaustive#652
Conversation
| /// Errors returned during serializing to `application/x-www-form-urlencoded`. | ||
| #[derive(Clone, Debug, PartialEq, Eq)] | ||
| #[non_exhaustive] | ||
| pub enum Error { |
There was a problem hiding this comment.
I kinda dislike this being an enum at all, but that's something that can be refactored separately.
There was a problem hiding this comment.
What were you thinking?
| #[allow(clippy::exhaustive_enums)] | ||
| pub enum EventFormatVersion { |
There was a problem hiding this comment.
Why not make this one non-exhaustive?
There was a problem hiding this comment.
So I wasn't sure about this or below but my idea was there this would always be a breaking change in the spec, and that it might be better to have an obvious break from version to version 🤷
There was a problem hiding this comment.
The whole purpose of room versions is being able to change things without breaking existing code. Why would adding to this inherently be a breaking change?
There was a problem hiding this comment.
Would the spec not semver bump? I guess I'm not sure about ruma's semver guarantees with respect to the matrix spec changes and their versioning? This probably kinda relates to my question about non_exhaustive enums with a _Custom variant and forward compat? If I had a better idea of how/when we want to make breaking changes.
| #[allow(clippy::exhaustive_enums)] | ||
| pub enum StateResolutionVersion { |
1971658 to
1d95327
Compare
|
I made both of the state-res RoomVersion structs |
No description provided.