mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
cargo: bump quick-xml from 0.23.0 to 0.26.0
Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.23.0 to 0.26.0. - [Release notes](https://github.com/tafia/quick-xml/releases) - [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md) - [Commits](https://github.com/tafia/quick-xml/compare/v0.23.0...v0.26.0) --- updated-dependencies: - dependency-name: quick-xml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
iequidoo
parent
c562d17925
commit
5432e108a1
@@ -59,12 +59,18 @@ fn parse_protocol<B: BufRead>(
|
||||
|
||||
let mut current_tag: Option<String> = None;
|
||||
loop {
|
||||
match reader.read_event(&mut buf)? {
|
||||
match reader.read_event_into(&mut buf)? {
|
||||
Event::Start(ref event) => {
|
||||
current_tag = Some(String::from_utf8_lossy(event.name()).trim().to_lowercase());
|
||||
current_tag = Some(
|
||||
String::from_utf8_lossy(event.name().as_ref())
|
||||
.trim()
|
||||
.to_lowercase(),
|
||||
);
|
||||
}
|
||||
Event::End(ref event) => {
|
||||
let tag = String::from_utf8_lossy(event.name()).trim().to_lowercase();
|
||||
let tag = String::from_utf8_lossy(event.name().as_ref())
|
||||
.trim()
|
||||
.to_lowercase();
|
||||
if tag == "protocol" {
|
||||
break;
|
||||
}
|
||||
@@ -73,7 +79,7 @@ fn parse_protocol<B: BufRead>(
|
||||
}
|
||||
}
|
||||
Event::Text(ref e) => {
|
||||
let val = e.unescape_and_decode(reader).unwrap_or_default();
|
||||
let val = e.unescape().unwrap_or_default();
|
||||
|
||||
if let Some(ref tag) = current_tag {
|
||||
match tag.as_str() {
|
||||
@@ -115,9 +121,9 @@ fn parse_redirecturl<B: BufRead>(
|
||||
reader: &mut quick_xml::Reader<B>,
|
||||
) -> Result<String, quick_xml::Error> {
|
||||
let mut buf = Vec::new();
|
||||
match reader.read_event(&mut buf)? {
|
||||
match reader.read_event_into(&mut buf)? {
|
||||
Event::Text(ref e) => {
|
||||
let val = e.unescape_and_decode(reader).unwrap_or_default();
|
||||
let val = e.unescape().unwrap_or_default();
|
||||
Ok(val.trim().to_string())
|
||||
}
|
||||
_ => Ok("".to_string()),
|
||||
@@ -131,9 +137,11 @@ fn parse_xml_reader<B: BufRead>(
|
||||
|
||||
let mut buf = Vec::new();
|
||||
loop {
|
||||
match reader.read_event(&mut buf)? {
|
||||
match reader.read_event_into(&mut buf)? {
|
||||
Event::Start(ref e) => {
|
||||
let tag = String::from_utf8_lossy(e.name()).trim().to_lowercase();
|
||||
let tag = String::from_utf8_lossy(e.name().as_ref())
|
||||
.trim()
|
||||
.to_lowercase();
|
||||
|
||||
if tag == "protocol" {
|
||||
if let Some(protocol) = parse_protocol(reader)? {
|
||||
|
||||
Reference in New Issue
Block a user