Update Rust crate quick-xml to 0.37.0 #188
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.30.0
->0.37.0
Release Notes
tafia/quick-xml (quick-xml)
v0.37.0
Compare Source
New Features
From<String>
andFrom<Cow<str>>
forquick_xml::de::Text
.SimpleTypeDeserializer
andSimpleTypeSerializer
public.IntoDeserializer
for&mut Deserializer
.Bug Fixes
$text
fields and those$value
fieldsthat are serialized as a text (for example,
usize
orString
).which is only
"true"
,"1"
,"false"
, and"0"
. Previously the following valuesalso was accepted:
bool
true
"True"
,"TRUE"
,"t"
,"Yes"
,"YES"
,"yes"
,"y"
false
"False"
,"FALSE"
,"f"
,"No"
,"NO"
,"no"
,"n"
Misc Changes
SeError
fromDeError
in theserialize
feature.Serialize functions and methods now return
SeError
.std::io::Error
fromWriter
methods.NamespaceError
andEncodingError
fromError
.Error::EscapeError
toError::Escape
to match other variants.Error
where only one variant is ever returned:attribute related methods on
BytesStart
andBytesDecl
returnsAttrError
Serializer
by returning an enumeration with kind of written dataVec<usize>
orVec<String>
in$value
fields. They cannot be deserialized back with the same resultescape
and it variants take aimpl Into<Cow<str>>
argument and implementFrom<(&'a str, Cow<'a, str>)>
onAttribute
DeError::InvalidInt
,DeError::InvalidFloat
andDeError::InvalidBoolean
.Now the responsibility for returning the error lies with the visitor of the type.
See ratiohttps://github.com/serde-rs/serde/pull/2811ull/2811
v0.36.2
Compare Source
Bug Fixes
v0.36.1
Compare Source
New Features
Reader::stream()
that can be used to read arbitrary datafrom the inner reader while track position for XML reader.
v0.36.0
Compare Source
Bug Fixes
<![CDATA[
can start it.Previously any case was allowed.
.error_position()
when encountering syntax error for open or self-closed tag.Misc Changes
reader::Parser
,reader::ElementParser
andreader::PiParser
moved to the new moduleparser
.v0.35.0
Compare Source
New Features
reader::Config::allow_unmatched_ends
to permit dangling end tagsBug Fixes
Reader::read_to_end
familyof methods and trimming of the trailing spaces in
Reader::read_text
whentrim_text_start
is set and the last event is not aText
event.As a result, the following variants of
quick_xml::escape::EscapeError
are removed:TooLongDecimal
TooLongHexadecimal
Attribute::unescape_value
which does not unescape predefined values since 0.32.0.Text
event may be skipped inread_event_into()
and
read_event_into_async()
in some circumstances.Misc Changes
EscapeError::UnrecognizedSymbol
renamed toEscapeError::UnrecognizedEntity
.PartialEq
forEscapeError
.EscapeError
byInvalidCharRef
variantwith a new
ParseCharRefError
inside:EntityWithNull
InvalidDecimal
InvalidHexadecimal
InvalidCodepoint
v0.34.0
Compare Source
Bug Fixes
Reader<impl BufRead>
readers.Misc Changes
Attribute::decode_and_unescape_value
andAttribute::decode_and_unescape_value_with
nowaccepts
Decoder
instead ofReader
. UseReader::decoder()
to get it.Writer::write_event
now consumes event. UseEvent::borrow()
if you want to keep ownership.Reader::error_position()
andReader::buffer_position()
changed fromusize
tou64
.Span
changed fromRange<usize>
toRange<u64>
.v0.33.0
Compare Source
New Features
From<QName>
forBytesStart
andBytesEnd
.Bug Fixes
trim_text_start = false
andtrim_text_end = true
.Misc Changes
Event::PI
to a new dedicatedBytesPI
type.const
as much functions as possible:resolve_html5_entity()
resolve_predefined_entity()
resolve_xml_entity()
Attr::key()
Attr::value()
Attributes::html()
Attributes::new()
BytesDecl::from_start()
Decoder::encoding()
Deserializer::get_ref()
IoReader::get_ref()
LocalName::into_inner()
Namespace::into_inner()
NsReader::config()
NsReader::prefixes()
Prefix::into_inner()
QName::into_inner()
Reader::buffer_position()
Reader::config()
Reader::decoder()
Reader::error_position()
Reader::get_ref()
SliceReader::get_ref()
Writer::get_ref()
Writer::new()
quick_xml::escape::resolve_html5_entity
underescape-html
feature again.This function has significant influence to the compilation time (10+ seconds or 5x times)
v0.32.0
Compare Source
The way to configure parser is changed. Now all configuration is contained in the
Config
struct and can be applied at once. Whenserde-types
feature is enabled,configuration is serializable.
The method of reporting positions of errors has changed - use
error_position()
to get an offset of the error position. For
SyntaxError
s the rangeerror_position()..buffer_position()
also will represent a span of error.The way of resolve entities with
unescape_with
are changed. Those methods no longerresolve predefined entities.
New Features
Error::IllFormed
.config()
andconfig_mut()
to inspect and change the parserconfiguration. Previous builder methods on
Reader
/NsReader
was replaced bydirect access to fields of config using
reader.config_mut().<...>
.Config::enable_all_checks
to turn on or off allwell-formedness checks.
escape::minimal_escape()
which escapes only&
and<
.BytesCData::minimal_escape()
which escapes only&
and<
.Serializer::set_quote_level()
which allow to set desired level of escaping.NsReader::prefixes()
to list all the prefixes currently declared.impl_deserialize_for_internally_tagged_enum
macro so thatit can handle every attribute that does not match existing cases within an enum variant.
Writer::create_element
. This is breaking change!ElementWriter::new_line()
which enables pretty printing elements with multiple attributes.Deserializer::get_ref()
to get XML Reader from serde Deserializerquick_xml::escape::resolve_predefined_entity
quick_xml::escape::resolve_xml_entity
quick_xml::escape::resolve_html5_entity
quick_xml::reader::PiParser
.quick_xml::reader::ElementParser
.Bug Fixes
<
.Error::IllFormed(DoubleHyphenInComment)
.Error::IllFormed(MissingDoctypeName)
.expand_empty_elements
is set to true.Misc Changes
quick_xml::Error
type to provide more accurate information:Error::EndEventMismatch
replaced byIllFormedError::MismatchedEndTag
in some casesError::EndEventMismatch
replaced byIllFormedError::UnmatchedEndTag
in some casesError::TextNotFound
was removed because not usedError::UnexpectedBang
replaced bySyntaxError
Error::UnexpectedEof
replaced bySyntaxError
in some casesError::UnexpectedEof
replaced byIllFormedError
in some casesError::UnexpectedToken
replaced byIllFormedError::DoubleHyphenInComment
Error::XmlDeclWithoutVersion
replaced byIllFormedError::MissingDeclVersion
(in #684)Error::EmptyDocType
replaced byIllFormedError::MissingDoctypeName
(in #684)SyntaxError
s: now they are always pointsto the start of markup (i. e. to the
<
character) with error. Useerror_position()
for that.
<??>
parsed asEvent::PI
with empty content instead of raisingsyntax error.
<?xml?>
parsed asEvent::Decl
instead ofEvent::PI
.QuoteLevel::Partial
when using serde serializer.buffer_position()
now always report the position the parser last seen.To get an error position use
error_position()
.intermediate custom deserializer.
Clone
for [DeEvent
][DeEvent], [PayloadEvent
][PayloadEvent] and [Text
][Text].NoEntityResolver
toPredefinedEntityResolver
.lt
,gt
,apos
,quot
,amp
)in
unescape_with
family of methods. You should do that by yourself using the methodslisted above.
v0.31.0
Compare Source
MSRV bumped to 1.56! Crate now uses Rust 2021 edition.
Enum representation was changed (it was buggy anyway) to ensure compatibility with
serde >= 1.0.181
New Features
xml
andxmlns
) to their appropriate URIs.Also, enforce namespace constraints related to these well-known namespaces.
ElementWriter
operations.Bug Fixes
xs:list
s from empty tags (<tag/>
or
<tag></tag>
). Previously anDeError::UnexpectedEof")
was returned in that caseunit structs, unit variants).
<int>123<something-else/></int>
is no longer validcontent. Previously all data after
123
up to closing tag would be silently skipped.simpleType
s (for example, attributes) intoOption
fields: now they are always deserialized asSome("")
.Misc Changes
Error
variant --Error::InvalidPrefixBind
.arbitrary
dependency -- we're actuallycompatible with version 1.0.0 and up.
ElementWriter::write_inner_content
(and newly added
ElementWriter::write_inner_content_async
of course).xs:list
s when some elements serialized to an empty string.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.