Bump quick-xml to 0.37.0 (#14354)

# Description
Bump `quick-xml` to `0.37.0`.

This came about rebasing `nushell` in Fedora, which now has `quick-xml`
0.36.

There is one breaking change in 0.33 as far as `nu-command` is
concerned, in that `Event::PI` is now a dedicated `BytesPI` type:


https://github.com/tafia/quick-xml/blob/master/Changelog.md#misc-changes-5

I've tested compiling and testing locally with `0.33.0`, `0.36.0` and
`0.37.0` - but let's future-proof by requiring `0.37.0`.


# User-Facing Changes
N/A

# Tests + Formatting
No additional tests required, existing tests pass

# After Submitting
N/A

Signed-off-by: Michel Lind <salimma@fedoraproject.org>
This commit is contained in:
Michel Lind 2024-11-18 18:26:31 -06:00 committed by GitHub
parent 6773dfce8d
commit 6e84ba182e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 708 additions and 465 deletions

1167
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -129,7 +129,7 @@ proc-macro-error = { version = "1.0", default-features = false }
proc-macro2 = "1.0"
procfs = "0.16.0"
pwd = "1.3"
quick-xml = "0.32.0"
quick-xml = "0.37.0"
quickcheck = "1.0"
quickcheck_macros = "1.0"
quote = "1.0"

View File

@ -4,7 +4,7 @@ use nu_engine::command_prelude::*;
use quick_xml::{
escape,
events::{BytesEnd, BytesStart, BytesText, Event},
events::{BytesEnd, BytesPI, BytesStart, BytesText, Event},
};
use std::{borrow::Cow, io::Cursor};
@ -406,7 +406,7 @@ impl Job {
let content_text = format!("{} {}", tag, content);
// PI content must NOT be escaped
// https://www.w3.org/TR/xml/#sec-pi
let pi_content = BytesText::from_escaped(content_text.as_str());
let pi_content = BytesPI::new(content_text.as_str());
self.writer
.write_event(Event::PI(pi_content))