Improves code style

pull/10/head
Tpt 6 years ago
parent 878f091367
commit 652d0d8b9d
  1. 4
      lib/src/sparql/xml_results.rs

@ -92,8 +92,8 @@ pub fn read_xml_results(source: impl BufRead + 'static) -> Result<QueryResult<'s
let name = event.attributes() let name = event.attributes()
.filter_map(|attr| attr.ok()) .filter_map(|attr| attr.ok())
.find(|attr| attr.key == b"name") .find(|attr| attr.key == b"name")
.ok_or(format_err!("No name attribute found for the <variable> tag")); .ok_or_else(|| format_err!("No name attribute found for the <variable> tag"))?;
variables.push(name?.unescape_and_decode_value(&reader)?); variables.push(name.unescape_and_decode_value(&reader)?);
} else if event.name() == b"link" { } else if event.name() == b"link" {
// no op // no op
} else { } else {

Loading…
Cancel
Save