Upgrading quick-xml 0.36 to 0.37
Breaking0.36.2 → 0.37.5Breaking10New9Changed3Fixed2
BreakingUpgrade verdict
10 breaking changes.
In plain terms
- The serializer now refuses to write several plain values in a row, since reading them back would not give the same result.
- Error types have been reorganized. Some error cases now have their own types, and some old error variants no longer exist.
- Renames Error::EscapeError to Error::Escape to match other variants.
- Removes DeError::InvalidInt, DeError::InvalidFloat and DeError::InvalidBoolean; the type's visitor now returns these errors.
Must act Top 3 of 10 that need code or config changes
What you must change
Breaking10
Serializer no longer serializes consequent primitive values, because they cannot be deserialized back to the same value.
SerializerChanges the crate's errors: some variants are split into their own error types and some are removed.
Renames Error::EscapeError to Error::Escape to match other variants.
Error::EscapeErrorError::EscapeRemoves DeError::InvalidInt, DeError::InvalidFloat and DeError::InvalidBoolean; the type's visitor now returns these errors.
DeError::InvalidIntDeError::InvalidFloatDeError::InvalidBooleanReduces the boolean values recognized by the serde Deserializer; use #[serde(deserialize_with)] to accept and parse strings for the old behavior.
Deserializer#[serde(deserialize_with)]Splits SeError from DeError in the serialize feature; serialize functions and methods now return SeError.
SeErrorDeErrorserializeWriter methods now return std::io::Error.
std::io::ErrorWriterSplits NamespaceError and EncodingError from Error.
NamespaceErrorEncodingErrorErrorNarrows error return types where only one variant is returned: attribute methods on BytesStart and BytesDecl now return AttrError.
ErrorBytesStartBytesDeclAttrErrorDisallows serialization of consequent primitives, such as Vec<usize> or Vec<String> in $value fields, since they cannot be deserialized back identically.
Vec<usize>Vec<String>$value