Skip to content

Commit

Permalink
Merge pull request #150 from cea-sec/dependabot/cargo/quick-xml-0.36.0
Browse files Browse the repository at this point in the history
Bump quick-xml from 0.31.0 to 0.36.0
  • Loading branch information
vruello authored Jul 11, 2024
2 parents 270161d + c187c91 commit c38b3aa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ itoa = "1.0.6"
libgssapi = { version = "0.7.2", features = ["iov"] }
log = "0.4.19"
mime = "0.3.17"
quick-xml = "0.31.0"
quick-xml = "0.36.0"
roxmltree = "0.20.0"
tokio = { version = "1.35.1", features = ["full"] }
rdkafka = { version = "0.36.0", features = ["zstd", "libz", "external-lz4"] }
Expand Down
18 changes: 11 additions & 7 deletions server/src/soap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use quick_xml::reader::Reader;
use quick_xml::writer::Writer;
use roxmltree::{Document, Node};
use std::collections::HashMap;
use std::io::ErrorKind;
use std::sync::Arc;
use uuid::Uuid;
use xmlparser::XmlCharExt;
Expand Down Expand Up @@ -276,7 +277,7 @@ impl Serializable for SubscriptionBody {
.write_inner_content(|writer| {
// Copy filter from "query" field
let mut reader = Reader::from_str(&self.query);
reader.trim_text(true);
reader.config_mut().trim_text(true);
loop {
match reader.read_event() {
Ok(Event::Eof) => break,
Expand All @@ -291,7 +292,7 @@ impl Serializable for SubscriptionBody {
.create_element("w:Bookmark")
.write_inner_content(|writer| {
let mut reader = Reader::from_str(bookmark);
reader.trim_text(true);
reader.config_mut().trim_text(true);
loop {
match reader.read_event() {
Ok(Event::Eof) => break,
Expand Down Expand Up @@ -547,11 +548,14 @@ impl Serializable for Body {
})?;
}
x => {
return Err(quick_xml::Error::UnexpectedToken(format!(
"Can not serialize body of {:?}",
x
)))
} // anyhow!("Can not serialize body of {:?}", x),
return Err(quick_xml::Error::Io(
std::io::Error::new(
ErrorKind::Other,
format!("Can not serialize body of {:?}", x),
)
.into(),
))
}
}
Ok(())
}
Expand Down

0 comments on commit c38b3aa

Please sign in to comment.