fix(deps): update rust - #327
Open
bootc-bot[bot] wants to merge 1 commit into
Open
Conversation
Signed-off-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com> Signed-off-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.41→0.421.24.1→1.25.0Release Notes
tafia/quick-xml (quick-xml)
v0.42.0Compare Source
This is a large release. The primary change is an ergonomic improvement across the entire API -
quick_xml now makes use of
&strandStringtypes where possible instead of&[u8]andVec<u8>. This requires significant refactoring of downstream code,but should result in a net simplification as well as potential performance improvements,
and opens up additional opportunities in future releases.
The MSRV has been raised to 1.86. We now use Rust 2024 Edition.
Breaking Changes
Non-UTF-8 input passed to
Reader::from_reader()withoutDecodingReaderwill nowproduce
Error::Encodinginstead of silently passing through invalid bytes.Use
DecodingReaderto transcode non-UTF-8 sources.QName,LocalName,Prefix,Namespace,PrefixDeclaration)now wrap
&strinstead of&[u8].into_inner()returns&str, andAsRef<str>is implemented (
AsRef<[u8]>has been removed).ResolveResult::Unknownnow containsStringinstead of
Vec<u8>, andNamespaceErrorvariants containStringinstead ofVec<u8>.decoder: Decoderfield from event types (BytesStart,BytesText,BytesCData,BytesRef) andAttributes. Thedecoder()method is no longer availableon these types. Decode methods on events now always assume UTF-8 input.
Error::missed_end()no longer takes aDecoderparameter.BytesStart,BytesEnd,BytesText,BytesCData,BytesPI,BytesRef) now storeCow<str>internally instead ofCow<[u8]>.into_inner()onBytesText,BytesCData,BytesPI, andBytesRefnow returnsCow<str>.BytesStart::set_name()now takes&strinstead of&[u8].Eventenum now implementDeref<Target = str>instead of
Deref<Target = [u8]>. ExplicitAsRef<str>impls are provided toavoid ambiguity.
decode()methods fromBytesText,BytesCData, andBytesRef.Content is already available as
&strviaDeref. Thexml10_content(),xml11_content(),xml_content(), andhtml_content()methods now returnCow<str>directly instead ofResult<Cow<str>, EncodingError>.Attribute::valueis nowCow<'a, str>instead ofCow<'a, [u8]>.The
From<(&[u8], &[u8])>impl has been removed.BytesDecl::version(),encoding(), andstandalone()now returnCow<'_, str>instead ofCow<'_, [u8]>.Reader::decoder()method. UseReader::encoding()instead(available with the
encodingfeature). Removeddecoder()from theXmlReadserde trait. Removed all methods from
Decoder(the struct is kept only forbackward compatibility with deprecated
Attributemethods).NamespaceError::TooManyDeclarationshas been renamed toTooManyBindings,and
NamespaceResolver::set_max_declarations_per_elementhas been renamed toNamespaceResolver::set_max_namespace_bindings, and the semantic behavior haschanged slightly. The default maximum has also been reduced from 256 to 128.
DeError::UnexpectedStartrenamed toDeError::MixedContent. That erroris emitted when you try to deserialize boolean, number or string
fieldfromsomething like
<field>text <tag/> another text</field>.Bug Fixes
\r,\n, and\tin attribute valuesas
&#​13;,&#​10;, and&#​9;respectively, preventing silent data loss fromXML attribute-value normalization on round-trip. Likewise
Attribute::fromperforms the same transformation.
Deserializernow correctly handles namespaces. Previouslythe namespace bindings might be applied or removed before the event actually
was consumed which lead to a couple of bugs.
Attributes::newandAttributes::htmlnow return empty iterators whentheir starting position is past the end of the input instead of panicking.
NamespaceResolver::push(and hence everyNsReaderStart/Emptyevent) now returns the new
NamespaceError::TooDeeplyNestedwhen a documentnests elements deeper than
u16::MAX, instead of overflowing the internalu16depth counter. Previously the unguardednesting_level += 1panickedunder
overflow-checksbuilds and silently wrapped in release, corruptingnamespace-scope bookkeeping on deeply nested untrusted input.
NamespaceResolvernow caps the total number of in-scope namespacebindings (default 128, configurable via
set_max_namespace_bindings),replacing the previous per-element
max_declarations_per_elementlimit.Deserializernow enforces a configurable recursion-depthlimit (default 128, matching
serde_json). Deeply nested XML returnsDeError::TooDeeplyNestedinstead of overflowing the native call stack.Use
Deserializer::recursion_limit()to adjust.\rin text content is now escaped as&#​13;by the serde serializer,BytesText::new(),escape(),partial_escape(), andminimal_escape(),preventing silent conversion to
\nfrom XML end-of-line normalization onround-trip. Note that
\rcannot be preserved through CDATA serializationbecause character references are not permitted inside CDATA sections.
Misc Changes
getting_started,writer,serde_roundtrip,reader_patterns,visitor) and anexamples/README.mdguide on choosing between the serde and pull-reader/writer APIs.
Attributemethods that take aDecoderparameter, sinceattribute values are now always valid UTF-8:
decoded_and_normalized_value(),decoded_and_normalized_value_with(),decode_and_unescape_value(), anddecode_and_unescape_value_with(). Usenormalized_value()andnormalized_value_with()instead.NamespaceResolver::withthat allows temporary applying namespacebindings from the start tag for the scope of a provided closure F, without making any
persistent change to the resolver. It is useful to check a peeked event which is
not yet consumed in custom implementations of peekable reader.
Deserializer::resolverandDeserializer::resolver_mutmethodsto get a namespace resolver used by this deserializer, because it no longer uses
an
NsReaderinternally.Hash,PartialOrd, andOrdforBytesTextandBytesCDatatypes.uuid-rs/uuid (uuid)
v1.25.0Compare Source
What's Changed
New Contributors
Full Changelog: uuid-rs/uuid@v1.24.1...1.25.0
Configuration
📅 Schedule: (in timezone UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate CLI.