jouleclaw: quick-xml 0.41's normalized_value — main's macOS energy backends job is red #455

Closed
dcharlot wants to merge 1 commit from fix/quick-xml-normalized-value into main
2 changed files with 6 additions and 6 deletions

View file

@ -286,7 +286,7 @@ pub fn parse_openvino_xml(
b"net" => {
for attr in e.attributes().flatten() {
let key = attr.key.as_ref();
let val = attr.unescape_value().unwrap_or_default().to_string();
let val = attr.normalized_value(quick_xml::XmlVersion::Implicit1_0).unwrap_or_default().to_string();
match key {
b"name" => net_name = val,
b"version" => {
@ -301,7 +301,7 @@ pub fn parse_openvino_xml(
let mut name = String::new();
let mut ty = String::new();
for attr in e.attributes().flatten() {
let val = attr.unescape_value().unwrap_or_default().to_string();
let val = attr.normalized_value(quick_xml::XmlVersion::Implicit1_0).unwrap_or_default().to_string();
match attr.key.as_ref() {
b"id" => { id = val.parse().unwrap_or(0); }
b"name" => { name = val; }
@ -321,7 +321,7 @@ pub fn parse_openvino_xml(
}
b"data" if in_layer_const => {
for attr in e.attributes().flatten() {
let val = attr.unescape_value().unwrap_or_default().to_string();
let val = attr.normalized_value(quick_xml::XmlVersion::Implicit1_0).unwrap_or_default().to_string();
match attr.key.as_ref() {
b"element_type" => {
cur_dtype = OvDtype::parse(&val);

View file

@ -222,7 +222,7 @@ pub fn parse_response(xml: &str) -> Result<TransformResult, TrxError> {
for attr in e.attributes().with_checks(false).flatten() {
if attr.key.as_ref() == b"Type" {
let v = attr
.unescape_value()
.normalized_value(quick_xml::XmlVersion::Implicit1_0)
.map_err(|err| TrxError::Decode(format!("entity attr: {err}")))?;
cur_entity_type = Some(v.into_owned());
}
@ -242,7 +242,7 @@ pub fn parse_response(xml: &str) -> Result<TransformResult, TrxError> {
for attr in e.attributes().with_checks(false).flatten() {
if attr.key.as_ref() == b"Name" {
let v = attr
.unescape_value()
.normalized_value(quick_xml::XmlVersion::Implicit1_0)
.map_err(|err| TrxError::Decode(format!("field attr: {err}")))?;
cur_field_name = Some(v.into_owned());
}
@ -255,7 +255,7 @@ pub fn parse_response(xml: &str) -> Result<TransformResult, TrxError> {
for attr in e.attributes().with_checks(false).flatten() {
if attr.key.as_ref() == b"Type" {
let v = attr
.unescape_value()
.normalized_value(quick_xml::XmlVersion::Implicit1_0)
.map_err(|err| TrxError::Decode(format!("uimsg attr: {err}")))?;
kind = match v.as_ref() {
"Inform" => UiMessageKind::Inform,